Inheritance: MonoBehaviour
Exemplo n.º 1
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        IntroController = FindObjectOfType <IntroController>();

        // Continue the game after the animation is over
        IntroController.Finish();
    }
Exemplo n.º 2
0
    public void FindUIObjects()
    {
        mainMenuCanvas = GameObject.FindGameObjectWithTag("Main Menu");

        introController = GameObject.FindGameObjectWithTag("Intro Canvas").GetComponent <IntroController>();
        introLogoAnim   = GameObject.FindGameObjectWithTag("Intro Logo").GetComponent <Animator>();
        introTextAnim   = GameObject.FindGameObjectWithTag("Intro Text").GetComponent <Animator>();
    }
Exemplo n.º 3
0
    protected override void Awake()
    {
        introController = GameObject.Find("Intro").GetComponent <IntroController>();
        avatarButton    = GetComponentsInChildren <Button>();

        nColor                  = avatarButton[0].colors;
        pColor                  = nColor;
        pColor.normalColor      = pColor.pressedColor;
        pColor.highlightedColor = pColor.pressedColor;
        avatarButton[0].colors  = pColor;
    }
Exemplo n.º 4
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(this);
        }

        muteText     = GameObject.Find("TMute");
        rotationText = GameObject.Find("TRotation");

        SetDefaultCursor();
        SetDefaultAudioClips();
    }
Exemplo n.º 5
0
 private void Awake()
 {
     //singleton pattern
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     for (int i = 0; i < tutorialImages.Length; i++)
     {
         tutorialImages[i] = tutorialScreens.transform.GetChild(i).gameObject; //each tutorial image and all its associated components
         disableAllComponent(tutorialImages[i]);
     }
     playBtn     = mainScreen.transform.GetChild(3).GetComponent <Button>();
     tutorialBtn = mainScreen.transform.GetChild(2).GetComponent <Button>();
     playBtn.onClick.AddListener(() => startGame());
     tutorialBtn.onClick.AddListener(() => startTutorial());
 }
Exemplo n.º 6
0
 private void Awake()
 {
     instance = this;
 }
Exemplo n.º 7
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 8
0
 private void Start()
 {
     IntroController.LoadScene();
 }
Exemplo n.º 9
0
 public void BindToIntro(IntroController intro)
 {
     _introController = intro;
 }