Ejemplo n.º 1
0
 public void AddItemToPot(GameObject hold, GameObject ground)
 {
     if (PlayerDataManager.instance.data.Level1_Progress["PotThings"] == "")
     {
         if (hold.name != "Leg")
         {
             hold.GetComponent <ItemMoveBase>().PutInBag();
         }
         else
         {
             GameObject.Find("Soup").GetComponent <Image>().sprite        = Resources.Load <Sprite>("Item/Level1/湯_蛙腳");
             PlayerDataManager.instance.data.Level1_Progress["PotThings"] = "Leg";
             PlayerDataManager.instance.data.Level1_Progress["Leg"]       = "消失";
             Destroy(hold);
         }
     }
     else if (PlayerDataManager.instance.data.Level1_Progress["PotThings"] == "Leg")
     {
         if (hold.name != "Spoon")
         {
             hold.GetComponent <ItemMoveBase>().PutInBag();
         }
         else
         {
             GameObject.Find("Soup").GetComponent <Image>().sprite        = Resources.Load <Sprite>("Item/Level1/湯_蛙腳_湯匙");
             PlayerDataManager.instance.data.Level1_Progress["PotThings"] = "Leg,Spoon";
             PlayerDataManager.instance.data.Level1_Progress["Spoon"]     = "消失";
             Destroy(hold);
         }
     }
     else if (PlayerDataManager.instance.data.Level1_Progress["PotThings"] == "Leg,Spoon")
     {
         if (hold.name != "Seaweed")
         {
             hold.GetComponent <ItemMoveBase>().PutInBag();
         }
         else
         {
             GameObject.Find("Soup").GetComponent <Image>().sprite        = Resources.Load <Sprite>("Item/Level1/湯_蛙腳_湯匙_海草");
             PlayerDataManager.instance.data.Level1_Progress["PotThings"] = "Leg,Spoon,Seaweed";
             PlayerDataManager.instance.data.Level1_Progress["Leg"]       = "消失";
             Destroy(hold);
             GameObject potion = Instantiate(Resources.Load("Item/Level1/Potion", typeof(GameObject)) as GameObject);
             potion.transform.SetParent(GameObject.Find("BackGround").transform);
             potion.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
             potion.name = "Potion";
             potion.GetComponent <Potion>().PutInBag();
             DialogueManager.Instance.StartDialogue("Level1/藥水完成", () => GetItemInfo.ShowGetInfo("Potion"));
             PlayerDataManager.instance.data.Level1_Progress["Potion"] = "背包";
             Debug.Log("GetPotion");
         }
     }
 }
Ejemplo n.º 2
0
 public void BookAndSeaShellMan(GameObject hold, GameObject ground)
 {
     Destroy(hold);
     DialogueManager.Instance.StartDialogue("Level1/給貝殼人BL本", () =>
     {
         ground.GetComponent <Image>().sprite = Resources.Load <Sprite>("Item/Level1/貝殼人-色");
         GetItemInfo.ShowGetInfo("Fruit", () =>
         {
             PlayerDataManager.instance.data.Level1_Progress["Book"] = "消失";
             DialogueManager.Instance.StartDialogue("Level1/拿取果實", () => GameObject.Find("Level1End").transform.GetChild(0).gameObject.SetActive(true));
         });
     });
 }
Ejemplo n.º 3
0
    public void EelAndLaptop(GameObject hold, GameObject ground)
    {
        GameObject.Find("Charger").GetComponent <Image>().color = new Color32(255, 255, 255, 255);
        GameObject leg = Instantiate(Resources.Load("Item/Level1/Leg", typeof(GameObject)) as GameObject);

        leg.transform.SetParent(GameObject.Find("BackGround").transform);
        leg.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
        leg.name = "Leg";
        leg.GetComponent <Leg>().PutInBag();
        DialogueManager.Instance.StartDialogue("Level1/電鰻放筆電", () => GetItemInfo.ShowGetInfo("Leg", () => CheckItemCollection()));
        PlayerDataManager.instance.data.Level1_Progress["Eel"] = "消失";
        Destroy(hold);
        //Resource Load Leg To Bag
        CheckItemCollection();
    }
Ejemplo n.º 4
0
 public void AllCollect()
 {
     if (PlayerDataManager.instance.data.Level1_Progress["Seaweed"] != "背包")
     {
         return;
     }
     if (PlayerDataManager.instance.data.Level1_Progress["Spoon"] != "背包")
     {
         return;
     }
     if (PlayerDataManager.instance.data.Level1_Progress["Leg"] != "背包")
     {
         return;
     }
     DialogueManager.Instance.StartDialogue("Level1/購得蛙腿", () => GetItemInfo.ShowGetInfo("Leg", () =>
     {
         Debug.Log("將蛙腿放入背包");
     }));
 }
Ejemplo n.º 5
0
 public void GlassAndDolphin(GameObject hold, GameObject ground)
 {
     Destroy(hold);
     DialogueManager.Instance.StartDialogue("Level1/拯救海豚", () =>
     {
         GameObject book = Instantiate(Resources.Load("Item/Level1/Book", typeof(GameObject)) as GameObject);
         book.transform.SetParent(GameObject.Find("BackGround").transform);
         book.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
         book.name = "Book";
         book.GetComponent <Book>().PutInBag();
         GetItemInfo.ShowGetInfo("Book", () =>
         {
             DialogueManager.Instance.StartDialogue("Level1/獲得BL本");
             PlayerDataManager.instance.data.Level1_Progress["Glass"]   = "消失";
             PlayerDataManager.instance.data.Level1_Progress["Dolphin"] = "消失";
             Destroy(ground);
         });
     });
 }
Ejemplo n.º 6
0
 public void GloveAndEel(GameObject hold, GameObject ground)
 {
     DialogueManager.Instance.StartDialogue("Level1/拿電鰻_1", () =>
     {
         Destroy(hold);
         PlayerDataManager.instance.data.Level1_Progress["Glove"] = "消失";
         ground.GetComponent <Eel>().collected = true;
         ground.GetComponent <Eel>().PutInBag();
         PlayerDataManager.instance.data.Level1_Progress["Eel"] = "背包";
         GetItemInfo.ShowGetInfo("Eel", () =>
         {
             DialogueManager.Instance.StartDialogue("Level1/拿電鰻_2", () =>
             {
                 var spoon       = GameObject.Find("Spoon").GetComponent <Spoon>();
                 spoon.collected = true;
                 spoon.PutInBag();
                 PlayerDataManager.instance.data.Level1_Progress["Spoon"] = "背包";
                 GetItemInfo.ShowGetInfo("Spoon");
             });
         });
     });
     hold.GetComponent <Glove>().PutInBag();
 }
Ejemplo n.º 7
0
    public void click()
    {
        if (count < 4)
        {
            count += 1;
        }
        if (count == 3 & PlayerDataManager.instance.data.Level1_Progress["Glass"] == "未出現")
        {
            a.sprite = Resources.Load <Sprite>("Item/Level1/隱藏草 - 開");
        }

        if (count == 4 & PlayerDataManager.instance.data.Level1_Progress["Glass"] == "未出現")
        {
            GetItemInfo.ShowGetInfo("Glass", () => {
                a.sprite = Resources.Load <Sprite>("Item/Level1/隱藏草");
                PlayerDataManager.instance.data.Level1_Progress["Glass"] = "背包";
                GameObject glass = Instantiate(Resources.Load("Item/Level1/Glass", typeof(GameObject)) as GameObject);
                glass.transform.SetParent(GameObject.Find("BackGround").transform);
                glass.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
                glass.name = "Glass";
                glass.GetComponent <Glass>().PutInBag();
            });
        }
    }
Ejemplo n.º 8
0
 public override void picking()
 {
     DialogueManager.Instance.StartDialogue("Level1/拿手套1", () => GetItemInfo.ShowGetInfo("Glove", () => DialogueManager.Instance.StartDialogue("Level1/拿手套2", () => this.collected = true)));
     PlayerDataManager.instance.data.Level1_Progress["Glove"] = "背包";
 }
Ejemplo n.º 9
0
 public override void picking()
 {
     GetItemInfo.ShowGetInfo("Eel");
 }
Ejemplo n.º 10
0
 //需在點完獲得物品消息在設collected為true 防止點物品後可直接拖拉
 public override void picking()
 {
     DialogueManager.Instance.StartDialogue("Level1/拿海藻", () => GetItemInfo.ShowGetInfo("Seaweed", () => { this.collected = true;
                                                                                                           GameManager.Instance.GetComponent <Level1Control>().CheckItemCollection(); }));
     PlayerDataManager.instance.data.Level1_Progress["Seaweed"] = "背包";
 }