Example #1
0
    void generateCannonBall()
    {
        GameObject        cbClone        = Instantiate(cannonBall, transform.position, transform.rotation);
        CannonBallManager cbCloneManager = cbClone.GetComponent <CannonBallManager>();

        cbCloneManager.timeInWorld   = 5f;
        cbCloneManager.gunSpawnPoint = transform;
    }
Example #2
0
        public Physics(Game game, Player player, ContentManager Content, TanksOnAHeightmap.GameBase.Shapes.Terrain terrain, Space space)
        {
            Cannon = new Cannon(game, player.tank);
            CannonBallManager = new CannonBallManager(game);
            EnemyCannon.playerTank = player.tank;

            healthManager = new HealthManager(game, space);
            this.Content = Content;
            this.Components = game.Components;
            this.game = game;
            this.player = player;
            this.tank = player.tank;
            this.terrain = terrain;
            this.space = space;
        }