//===============================================================================
    public IEnumerator Time_Update()
    {
        for (; Time > 0;)
        {
            yield return(new WaitForSeconds(1));

            SetTime(Time - 1);

            HP_C();
            if (Time % 1 == 0)
            {
                SpBox();
            }

            if (Time < 5 && Game_LV <= LV && Game_LV < 2)
            {
                PalyUI.UI.LVUpStart.OpenLvUp(Game_LV);
                Game_LV++;
                print("生產升級物件");
            }
        }
        SourceCon.Play("End", 1f, 0.5f);
        G0_MainUI._.UI.Score.Open(Sceore);
        print("時間到");
    }
//===============================================================================
    public void Eat_LvUp(int n)
    {
        // print (LV);
        SourceCon.Play("LvUp");
        SetTime(Time + Game_P.Time_Up [LV]);
        LV = n;
    }
Beispiel #3
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (Source_Name != "")
     {
         SourceCon.Play(Source_Name);
     }
     SetSize(true);
 }
Beispiel #4
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (Source_Name != "")
     {
         SourceCon.Play(Source_Name);
     }
     if (!Switch)
     {
         OK = true;
         gameObject.GetComponent <Image> ().sprite = TrueIm;
     }
 }
Beispiel #5
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (Source_Name != "")
     {
         SourceCon.Play(Source_Name);
     }
     Start_V3 = eventData.position;
     End_V3   = eventData.position;
     if (Start_Del != null)
     {
         Start_Del(eventData.position);
     }
 }
Beispiel #6
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (Source_Name != "")
     {
         SourceCon.Play(Source_Name);
     }
     Start_V3 = Camera.main.ScreenToWorldPoint(Input.mousePosition);
     End_V3   = Camera.main.ScreenToWorldPoint(Input.mousePosition);
     if (Start_Del != null)
     {
         Start_Del(Start_V3);
     }
 }
    //偵測碰撞
    public void Eat(GameObject g)
    {
        if (g == null)
        {
            return;
        }

        if (g.tag == "Box")
        {
            if (Play_Mod.Eat_Box())
            {
                SourceCon.Play("Box", 0.3f, 2f);
                g.GetComponent <G0_Box> ().End();
                SetTu(1);
            }
        }
        else if (g.tag == "LvUp")
        {
            if (g.name == "LvUp_0")
            {
                Play_Mod.Eat_LvUp(1);
            }
            else if (g.name == "LvUp_1")
            {
                Play_Mod.Eat_LvUp(2);
            }
            g.GetComponent <G0_LvUp> ().End();
            SetLv(Play_Mod.LV);
        }
        else if (g.tag == "End")
        {
            Play_Mod.Lose_Box(g.name);

            if (Play_Mod.BoxN <= 0)
            {
                SetTu(0);
            }
        }
        else if (g.tag == "Reset")
        {
            Play_Mod.IsReset = true;
        }
    }