/* [Header("PlayerInfo")]
     * public int Playerlives = 3;
     */

    /* private void Awake() //Appliying Singleton for future Use
     * {
     *   int numGameSessions = FindObjectsOfType<GameSession>().Length;
     *   if(numGameSessions > 1)
     *   {
     *       Destroy(this.gameObject);
     *   }
     *   else
     *   {
     *       DontDestroyOnLoad(this.gameObject);
     *   }
     * } */

    void Start()
    {
        voicetotext    = FindObjectOfType <VoiceToText>();
        voiceScript    = FindObjectOfType <VoiceMovement>();
        keyboardscript = FindObjectOfType <PlayerMovementRB>();
        LoseLabel.SetActive(false);
        InstructionsLabel.SetActive(true);
        ScoreLabel.SetActive(false);
        VoicetoTextLabel.SetActive(true);
        keyboardscript.enabled = true;
    }
Beispiel #2
0
 private void Start()
 {
     player = GameObject.FindWithTag("PlayerBody").GetComponent <PlayerMovementRB>();
     anim   = GameObject.FindWithTag("Enemy").GetComponent <Animator>();
     enemy  = GameObject.FindWithTag("Enemy").GetComponent <EnemyMovementAI>();
 }