RemovePosition() public method

public RemovePosition ( ) : Entity
return Entity
        /*
         * 
         * Wiki
         * 
         * 
         */

        static void entityExample(Entity entity) {
            entity.AddPosition(3, 7);
            entity.AddHealth(100);
            entity.isMovable = true;

            entity.ReplacePosition(10, 100);
            entity.ReplaceHealth(entity.health.health - 1);
            entity.isMovable = false;

            entity.RemovePosition();

            var hasPos = entity.hasPosition;
            var movable = entity.isMovable;
        }
Exemplo n.º 2
0
        static void positionComponent(Entity e, PositionComponent component, int x, int y)
        {
            var pos = e.position;
            var has = e.hasPosition;

            e.AddPosition(x, y);
            e.AddPosition(component);

            e.ReplacePosition(x, y);

            e.RemovePosition();
        }