public PlayerRotatingGun(Ship parent, Vector2 positionRelativeToParent, float directionRelativeToParent, GunnerController controller)
            : base(parent, positionRelativeToParent, directionRelativeToParent, (float)(Math.PI * .5))
        {
            
            controller.Register(this);
            this.controller = controller;

            Gun gun1 = new Gun(this, new Vector2(50f, 10), 0);
            GameObject.Collection.Add(gun1);
            Gun gun2 = new Gun(this, new Vector2(50f, -10), 0);
            GameObject.Collection.Add(gun2);
        }
示例#2
0
 public PlayerGun(Ship parent, Vector2 positionRelativeToParent, float directionRelativeToParent, InputManager inputManager)
     :base(parent, positionRelativeToParent, directionRelativeToParent)
 {
     inputManager.Register(space, this);
 }
 public PlayerRotatingGun(Ship parent, Vector2 positionRelativeToParent, float directionRelativeToParent, InputManager inputManager)
     : base(parent, positionRelativeToParent, directionRelativeToParent, (float)(Math.PI * .5))
 {
     inputManager.Register(space, this);
 }
示例#4
0
 public Bullet(Ship owner, Vector2 position, float direction)
     : base(new Collidable(Textures.Bullet, position, Color.White, 0, new Vector2(20, 5), 1), position, direction, speed, speed, 0, 0, 0)
 {
     this.start = position;
     this.owner = owner;
 }