Example #1
0
            public 怪物(string 怪物名稱)
            {
                BOTCH.Controllers.GooglesHeet GH = new GooglesHeet();
                GH.SstGooglesHeet();
                var values = GH.ReadEntries("怪物", "A", "J");

                List <string> 卡牌清單 = new List <string>();

                foreach (var row in values)
                {
                    if (row[0].ToString() == 怪物名稱)
                    {
                        this.稱    = row[HC.A].ToString();
                        this.階級   = row[HC.B].ToString();
                        this.血量   = Convert.ToInt32(row[HC.C]);
                        this.傷害   = Convert.ToInt32(row[HC.D]);
                        this.圖片網址 = row[HC.E].ToString();

                        break;
                    }
                }

                卡牌清單 = GH.CardList(this.稱, "怪物");
                牌庫初始化 牌庫初始化 = new 牌庫初始化(卡牌清單);

                this.牌庫 = 牌庫初始化.牌庫;
            }
Example #2
0
            public 玩家(string 角色名稱)
            {
                BOTCH.Controllers.GooglesHeet GH = new GooglesHeet();
                GH.SstGooglesHeet();
                var values = GH.ReadEntries("角色", "A", "M");

                List <string> 卡牌清單 = new List <string>();

                foreach (var row in values)
                {
                    if (row[0].ToString() == 角色名稱)
                    {
                        this.稱    = row[HC.A].ToString();
                        this.職業   = row[HC.B].ToString();
                        this.血量   = Convert.ToInt32(row[HC.C]);
                        this.傷害   = Convert.ToInt32(row[HC.D]);
                        this.樓層   = Convert.ToInt32(row[HC.E]);
                        this.動作日期 = Convert.ToDateTime(row[HC.F]);
                        this.動作次數 = Convert.ToInt32(row[HC.G]);

                        break;
                    }
                }

                卡牌清單 = GH.CardList(this.稱, "玩家");
                牌庫初始化 牌庫初始化 = new 牌庫初始化(卡牌清單);

                this.牌庫 = 牌庫初始化.牌庫;
            }