/// <summary>
 /// 
 /// </summary>
 /// <param name="game"></param>
 /// <param name="initialPosition"></param>
 /// <param name="cannonBallManager"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 /// <param name="rotation"></param>
 /// <param name="respawnTime">Time in seconds before a destroyed object will respawn.</param>
 public DamageablePhysicsGameObject(Game game, Vector2 initialPosition, CannonBallManager cannonBallManager,
     float width, float height, float rotation, int respawnTime)
     : this(game, initialPosition, cannonBallManager, width, height, rotation)
 {
     respawnTimer = new Timer(respawnTime);
     respawnOnDeath = true;
 }
示例#2
0
 public Tower(Game game, Vector2 position, List<IGameObject> targets, CannonBallManager cannonBallManager)
     : base(game, position, cannonBallManager, 40, 100, 0)
 {
     this.targets = targets;
     minTargetFocusTimer = new Timer(10f);
     range = 300;
     Cannon = new Cannon(game, this, cannonBallManager, new Vector2(0, -35), 0.0f);
     base.Body.IsStatic = true;
 }
示例#3
0
        public Cannon(Game game, PhysicsGameObject parentObject, CannonBallManager cannonBallManager, Vector2 positionalOffset, float rotationalOffset)
            : base(game)
        {
            this.game = game;
            this.attachedToObject = parentObject;
            this.cannonBallManager = cannonBallManager;
            this.positionalOffset = positionalOffset;
            this.rotationalOffset = rotationalOffset;

            firingTimer = new Timer(3f);
        }