Пример #1
0
        public void Passlevel()
        {
            /*Packdata pack = new Packdata();
             * pack.count += 50;
             * Console.WriteLine($"恭喜通关,目前背包的金币个数:{pack.count}");*/
            //Packdata pack=Packdata.GetInstance();
            Packdata pack  = Packdata.Instance;
            int      count = pack.Count;

            count += 50;
            //pack.Setcount(count);
            pack.Count = count;
            Console.WriteLine($"恭喜通关,目前背包的金币个数:{pack.Count}");
        }//通关奖励
Пример #2
0
        public void Buy()
        {
            /*Packdata pack = new Packdata();
             * pack.Count -= 20;
             * Console.WriteLine($"在商店消费后,目前背包的金币个数:{pack.Count}");*/
            //Packdata pack=Packdata.GetInstance();
            Packdata pack  = Packdata.Instance;
            int      count = pack.Count;

            count -= 20;
            //pack.Setcount(count);
            pack.Count = count;
            Console.WriteLine($"在商店消费后,目前背包的金币个数:{pack.Count}");
        }//商店花销