Inheritance: MonoBehaviour
    // Use this for initialization
    void Start()
    {
        btnman = GameObject.Find("BtnManager").GetComponent <BtnManager>();
        if (GameObject.FindGameObjectWithTag("MenuPanel1"))
        {
            menupanel1 = GameObject.FindGameObjectWithTag("MenuPanel1");
        }
        if (GameObject.FindGameObjectWithTag("MenuPanel2"))
        {
            menupanel2 = GameObject.FindGameObjectWithTag("MenuPanel2");
        }
        if (GameObject.FindGameObjectWithTag("MenuPanel2"))
        {
            menupanel2.SetActive(false);
        }



        if (!gameisstarted)
        {
            //this is the first instance - make it persist
            DontDestroyOnLoad(this.gameObject);
            gameisstarted = true;
        }
        else
        {
            // this must be a duplicate from a scene reload - DESTROY!
            Destroy(this.gameObject);
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     canvas = this.gameObject;
     lbl    = canvas.GetComponentInChildren <Text>();
     lbl.gameObject.SetActive(false);
     inputField.gameObject.SetActive(false);
     btnManager      = btnCanvas.GetComponent <BtnManager>();
     usernameChanger = GameObject.Find("TextUsername").GetComponent <UsernameChanger>();
 }
Example #3
0
    void Awake()
    {
        if (null == btnManager)
        {
            btnManager = GameObject.Find("ButtonManager").GetComponent <BtnManager>();
        }

        if (null == PlayerSelect)
        {
            PlayerSelect = GameObject.Find("SongPlayerSelect");
        }

        checkbox = GetComponent <UIToggle>();
    }
Example #4
0
    void Awake()
    {
        for (int i = 0; i < baseSoulsStone.Length; i++)
        {
            if (SoulSkillManager.INSTANCE.stoneReinforce[i] == 1)
            {
                baseSoulsStone[i].SetActive(true);
            }
        }
        for (int i = 0; i < 3; i++)
        {
            equipslotNum.Add(-1);
        }
        for (int i = 0; i < 11; i++)
        {
            jewelslotNum.Add(-1);
        }

        LoadedValue();
        for (int i = 0; i < jewelBtn.Length; i++)
        {
            jewelBtn[i] = GameObject.Find("Stone" + i);
            jewelBtn[i].AddComponent <JewelBtn>();
            jewelBtn[i].GetComponent <JewelBtn>().myNumber = i;
            jewelBtn[i].GetComponent <JewelBtn>().sdL      = GameObject.Find("ExplanationLabel").GetComponent <UILabel>();
        }
        for (int a = 0; a < equipSlot.Length; a++)
        {
            equipSlot[a] = GameObject.Find("EquipSlot" + a);
            equipSlot[a].AddComponent <EquipSlotBtn>();
            equipSlot[a].GetComponent <EquipSlotBtn>().myNum = a;
            equipSlot[a].GetComponent <EquipSlotBtn>().sdL   = GameObject.Find("ExplanationLabel").GetComponent <UILabel>();
        }
        btnmg         = GameObject.Find("BtnManager").GetComponent <BtnManager>();
        btnmg.jewelMg = gameObject;
    }
Example #5
0
 void Awake()
 {
     my = this;
 }
 // Use this for initialization
 void Start()
 {
     btn             = GameObject.Find("BtnManager").GetComponent <BtnManager>();
     gameModeManager = GameObject.Find("GameModeManager").GetComponent <GameModeScript>();
 }
Example #7
0
 private void Awake()
 {
     inst = this;
 }
Example #8
0
 private void Awake()
 {
     _instance = this;
 }