ReplaceHealth() public method

public ReplaceHealth ( int newValue ) : Entity
newValue int
return Entity
コード例 #1
0
        /*
         * 
         * 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;
        }