void Start()
 {
     allTiles     = new GameObject[width, height];
     matchManager = FindObjectOfType <MatchScript>();
     scoreManager = FindObjectOfType <ScoreScript>();
     gameManager  = FindObjectOfType <GameManager>();
     bombCounter  = 0;
     BoardSetUp();
 }
 void Start()
 {
     board         = FindObjectOfType <BoardScript>();
     matchManager  = FindObjectOfType <MatchScript>();
     inputManager  = FindObjectOfType <InputScript>();
     selectedTiles = new GameObject[3];
     isMatched     = false;
     isTurning     = false;
     needsToMove   = true;
     turn1         = 0;
     turn2         = 0;
 }
Exemple #3
0
    /*---------------------------------------------------------------*/

    void Start()
    {
        /* This is instantiating the tank objects as an accesable variable */
        player1 = GameObject.FindWithTag("PlayerTank1").GetComponent <PlayerTank1>();
        player2 = GameObject.FindWithTag("PlayerTank2").GetComponent <PlayerTank2>();

        /* this is instantiating the bullet object as an accesable variable */
        //Bullet = GameObject.FindWithTag("Bullet").GetComponent<ProjectileCollision>();

        /* instantiating the match script as a variable */
        match = GameObject.FindWithTag("GameController").GetComponent <MatchScript>();

        /* Instatiating variables to access the postitions of the tanks */
        tank1 = GameObject.FindWithTag("PlayerTank1").transform;
        tank2 = GameObject.FindWithTag("PlayerTank2").transform;

        /* setting the projectile timers */
        timer1 = baseTimer;
        timer2 = baseTimer;
    } // end void start