Exemplo n.º 1
0
 private static UIEnergyTooltip CreateInstance()
 {
     if (UIEnergyTooltip.Instance == null)
     {
         GameObject gameObject = Res.LoadGUI("GUI/EnergyTooltip");
         if (gameObject == null)
         {
             global::Debug.LogError(new object[]
             {
                 "Res.Load GUI/EnergyTooltip error"
             });
             return null;
         }
         GameObject gameObject2 = UnityEngine.Object.Instantiate(gameObject) as GameObject;
         if (gameObject2 == null)
         {
             global::Debug.LogError(new object[]
             {
                 "Instantiate GUI/EnergyTooltip error"
             });
             return null;
         }
         UIEnergyTooltip.Instance = gameObject2.AddComponent<UIEnergyTooltip>();
     }
     return UIEnergyTooltip.Instance;
 }
Exemplo n.º 2
0
 private void Awake()
 {
     this.contentLabel = base.transform.FindChild("content").GetComponent<UILabel>();
     this.backGround = base.transform.FindChild("backGround").GetComponent<UISprite>();
     UIEnergyTooltip.Instance = this;
 }