Esempio n. 1
0
 void Awake()
 {
     wolfHealth      = GetComponent <WolfHealth> ();
     animController  = GetComponent <Animator> ();
     audioSource     = GetComponent <AudioSource> ();
     variableStorage = GameObject.FindGameObjectWithTag("VariableStorage").GetComponent <VariableStorageController> ();
 }
 // Use this for initialization
 void Start()
 {
     variableStorage = GameObject.FindGameObjectWithTag("VariableStorage").GetComponent <VariableStorageController> ();
     if (variableStorage.battlesCount == 0)
     {
         textElement.text = "Use arrows to move and dodge, space to attack";
     }
     else
     {
         textElement.text = "Once more into the fray..";
     }
 }
Esempio n. 3
0
 void Awake()
 {
     DontDestroyOnLoad(this);
     if (storageControllerInstance == null)
     {
         storageControllerInstance = this;
     }
     else
     {
         DestroyObject(gameObject);
     }
 }
Esempio n. 4
0
    void Start()
    {
        variableStorage = GameObject.FindGameObjectWithTag("VariableStorage").GetComponent <VariableStorageController> ();

        if (skipToArena)
        {
            playerT.position = (Vector2)battleTrigger.position - Vector2.right * 4;
//			Debug.Log("player pos " + playerT.position);
        }
        bool showIntroductionText = showStartSequence && variableStorage.battlesCount == 0;

        storyTxtController.gameObject.SetActive(showIntroductionText);
        if (showIntroductionText)
        {
            storyTxtController.StartCoroutine(storyTxtController.PrintStartMessage());
        }
        currentState = showIntroductionText ? GameState.STARTSEQUENCE : GameState.GAMESTARTED;
    }