Example #1
0
    public void OnDeckBtnClick()
    {
        GameObject         go      = Instantiate(DeckInformationUI, transform.parent);
        ChooseStatus       mStatus = SceneStatusManager.Ins.current as ChooseStatus;
        List <CardContent> ccList  = new List <CardContent>();

        foreach (CardSource cs in mStatus.cc.Deck)
        {
            CardContent cc = cs.GenerateCard();
            ccList.Add(cc);
        }
        go.GetComponent <DeckInformationUI>().LoadDeckInfomation(ccList);
    }
Example #2
0
 /// <summary>
 /// 刷新所选章节所包含的关卡
 /// </summary>
 /// <param name="chapter">所选章节</param>
 private void RefreshDungeonGO(Chapter chapter)
 {
     foreach (Transform tf in DungeonParent.transform)
     {
         Destroy(tf.gameObject);
     }
     foreach (Dungeon dungeon in chapter.Dungeons)
     {
         GameObject go = Instantiate(DungeonGO, DungeonParent.transform);
         go.transform.localPosition = dungeon.Pos;
         Text index = go.transform.Find("NameFrame/Index").GetComponent <Text>();
         Text name  = go.transform.Find("NameFrame/Name").GetComponent <Text>();
         index.text = dungeon.DungeonIndex;
         name.text  = dungeon.DungeonName;
         go.GetComponent <Button>().onClick.AddListener(delegate()
         {
             ChooseStatus cs = SceneStatusManager.Ins.current as ChooseStatus;
             cs.ChangeSelectedDungeon(dungeon);
             ShowDungeonInfo(dungeon);
         });
     }
 }
Example #3
0
    public void OnStartBtnClick()
    {
        ChooseStatus status = SceneStatusManager.Ins.current as ChooseStatus;

        status.GoToDungeonStatus(this.foodCount);
    }