Exemplo n.º 1
0
 // Set references
 private void Awake()
 {
     _mAGUIRef = this.GetComponent <MoveAttackGUIController>();
     if (_mAGUIRef == null)
     {
         Debug.Log("There was no MoveAttackGUIController attached to " + _mAGUIRef.name);
     }
 }
    private bool isPaused;                         // If the game is paused or not

    // Set references
    private void Awake()
    {
        scriptsToTurnOff = new List <MonoBehaviour>();

        // Get the scripts on the GameController
        GameObject gameController = GameObject.FindWithTag("GameController");

        if (gameController == null)
        {
            Debug.Log("Could not find any GameObject with the tag GameController");
        }
        else
        {
            inpContRef = gameController.GetComponent <InputController>();
            if (inpContRef == null)
            {
                Debug.Log("Could not find InputController attached to " + gameController.name);
            }

            mAContRef = gameController.GetComponent <MoveAttackController>();
            if (mAContRef == null)
            {
                Debug.Log("Could not find MoveAttackController attached to " + gameController.name);
            }
            scriptsToTurnOff.Add(mAContRef);

            mAGUIContRef = gameController.GetComponent <MoveAttackGUIController>();
            if (mAGUIContRef == null)
            {
                Debug.Log("Could not find MoveAttackGUIController attached to " + gameController.name);
            }
            scriptsToTurnOff.Add(mAGUIContRef);

            enemyMAAIRef = gameController.GetComponent <EnemyMoveAttackAI>();
            if (enemyMAAIRef == null)
            {
                Debug.Log("Could not find EnemyMoveAttackAI attached to " + gameController.name);
            }
            scriptsToTurnOff.Add(enemyMAAIRef);

            turnSysRef = gameController.GetComponent <TurnSystem>();
            if (turnSysRef == null)
            {
                Debug.Log("Could not find TurnSystem attached to " + gameController.name);
            }
            scriptsToTurnOff.Add(turnSysRef);
        }
    }
Exemplo n.º 3
0
 // Called before Start
 // Set references
 private void Awake()
 {
     _mAGUIContRef = this.GetComponent <MoveAttackGUIController>();
 }