Пример #1
0
 private void Awake()
 {
     render       = this.transform.GetChild(0).GetComponent <SpriteRenderer>();
     shadowRender = this.transform.GetChild(1).GetComponent <SpriteRenderer>();
     collider     = this.GetComponent <Collider2D>();
     f_flyTime    = 2.0f * ground_height / f_gravity;
     if (StageManager.currentStage == 7)
     {
         levelHeight = GetComponent <LevelHeight>();
     }
     zArrange = GetComponent <ZArrange>();
 }
Пример #2
0
 // Use this for initialization
 void Awake()
 {
     zArrange   = GetComponent <ZArrange>();
     areaHeight = GameObject.Find("map").GetComponent <MapInfo>().heightArea;
 }