Ejemplo n.º 1
0
    void Awake( )
    {
        //Init some value
        video.clip           = null;
        bComboing            = false;
        bPausing             = false;
        bAnimFin             = false;
        combo                = 0;
        score                = 0;
        audio                = GetComponent <AudioSource> ( );
        resultTextController = GetComponent <ResultTextController> ( );
        camera               = Camera.main;
        pauseMenu.SetActive(false);
        touch.enabled = true;
        //subscribe the animation evenet on canvas which define the scene animation
        uiAnimHandler.OnAnimationFinClip += OnAnimationFinished;
        pauseBtn.onClick.AddListener(OnPauseClicked);
        retryBtn.onClick.AddListener(OnRetryClicked);
        continueBtn.onClick.AddListener(OnContinueClicked);
        menuBtn.onClick.AddListener(OnMenuClicked);
        //init for objectpooling
        List <IObjectPoolAble> tmp = new List <IObjectPoolAble> (notePool.Init( ));

        foreach (IObjectPoolAble item in tmp)
        {
            gameNotes.Add(item as GameNote);
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        this.m_timerText = GameObject.Find("TimerText");
        m_timerText.GetComponent <TextMeshProUGUI>().text = "Time " + m_timeLimit + "s";

        m_resultTextController = FindObjectOfType <ResultTextController>();
    }
    // Use this for initialization
    void Start()
    {
        m_anim = GetComponent <Animator>();

        m_resultTextController = FindObjectOfType <ResultTextController>();
        m_powerTextController  = FindObjectOfType <PowerTextController>();
        m_buttonController     = FindObjectOfType <ButtonController>();

        m_damageImage = GameObject.Find("DamageImage");
        m_damageImage.GetComponent <Image>().color = Color.clear;
    }
    // Use this for initialization
    void Start()
    {
        m_anim = GetComponent <Animator>();
        m_anim.SetInteger("battle", 1);

        m_resultTextController = FindObjectOfType <ResultTextController>();
        m_powerController      = FindObjectOfType <PowerController>();

        m_damageImage = GameObject.Find("DamageImage");
        m_damageImage.GetComponent <Image>().color = Color.clear;

        m_audioSource      = GetComponent <AudioSource>();
        m_buttonController = FindObjectOfType <ButtonController>();
    }
Ejemplo n.º 5
0
    // Start is called before the first frame update
    void Start()
    {
        gameStart              = false;
        gameSuspended          = false;
        turnCount              = 0;
        myEnemy                = GameObject.FindWithTag("Enemy").GetComponent <Enemy>();
        mySpawnController      = GameObject.FindWithTag("System").transform.Find("SpawnController").GetComponent <SpawnController>();
        myStartTextController  = GameObject.FindWithTag("System").transform.Find("UIController").transform.GetChild(0).Find("StartScreen").GetChild(0).GetComponent <StartScreenTextController>();
        myResultTextController = GameObject.FindWithTag("System").transform.Find("UIController").transform.GetChild(0).Find("Result").GetChild(0).GetComponent <ResultTextController>();

        foreach (GameObject shield in GameObject.FindGameObjectsWithTag("TowerShield"))
        {
            myTowerShields.Add(shield);
        }
    }