Пример #1
0
        private Bullet(Player owner, float x, float y, float direction, BulletParameters bulletParameters) : base((int)x, (int)y)
        {
            updateOrder = 1;

            _owner     = owner;
            _params    = bulletParameters;
            _direction = direction;

            _behaviour = addComponent(ConstructBehaviour(_params.BulletBehaviour));
            _renderer  = addComponent(new BulletRenderer(this));
        }
Пример #2
0
 public static void Create(Player owner, float x, float y, float direction, BulletParameters parameters)
 {
     var bulletEntity = Core.scene.addEntity(new Bullet(owner, x, y, direction, parameters));
 }