Examples of Varargs


Examples of org.luaj.vm2.Varargs

                Position pos = new Position(entityTable.get("position").get(1).checkint(), entityTable.get("position").get(2).checkint());
                int colour = entityTable.get("colour").checkint();
                boolean collidable = entityTable.get("collidable").checkboolean();

                Entity ent = level.createEntity(a.toString(), new Entity(pos, chr, colour, collidable));
                Varargs entTable = LuaLevel.this.luaEntityTable(a.toString(), ent);

                final String[] events = new String[]{"behavior", "onEntityCollision"};

                for (String ev : events) {
                    if (entityTable.get(ev) != NIL) {
View Full Code Here

Examples of org.luaj.vm2.Varargs

        }
    }

    public boolean isCollidable() {
        if (collideFunc != null) {
            Varargs retval = collideFunc.invoke();
            if (!retval.arg1().isboolean()) {
                return true; // make user set a default?
            }
            return retval.arg1().checkboolean();
        }
        return collidable;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.