Esempio n. 1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else
     {
         Destroy(this);
     }
     LowPolyAnimalPack.WanderScript.AllAnimals.Clear();
 }
Esempio n. 2
0
 void Awake()
 {
     Instance              = this;
     m_enterBtn            = this.transform.Find("Enter");
     m_escapeTips          = this.transform.Find("EscapeTips").GetComponent <Image>();
     m_patternName         = this.transform.Find("Pattern").Find("PatternName");
     m_patternDetail       = this.transform.Find("PatternDetail");
     m_patternDetailDetail = m_patternDetail.Find("Detail");
     m_patternDetailMap.Add(PatternType.Normal, m_patternDetailDetail.Find("Normal").gameObject);         // 模式详情
     m_patternSceneMap.Add(PatternType.Normal, "NormalScene");                                            // 对应模式的场景
     m_patternDetailMap.Add(PatternType.DoubleJump, m_patternDetailDetail.Find("DoubleJump").gameObject); // 模式详情
     m_patternSceneMap.Add(PatternType.DoubleJump, "DoubleJumpScene");                                    // 对应模式的场景
     m_patternDetailMap.Add(PatternType.Guardian, m_patternDetailDetail.Find("Guardian").gameObject);
 }
 private void Awake()
 {
     Instance = this;
 }