示例#1
0
    void Start()
    {
        Debug.Log("----------第1、2题-----------");
        Kindergarten kindergarten = SetKindergarten();

        ShowBottomGrade(ref kindergarten);

        Debug.Log("----------第3、4题-----------");
        Travel_Agency travel_Agency = new Travel_Agency(2500, 2200, 2000, 1900, 1900, 1900);
        int           MaMaIncomings = GetMaMaIncomings(ref kindergarten, ref travel_Agency);

        Debug.Log("园长妈妈这一单净赚" + MaMaIncomings + "元。");

        Debug.Log("---------第5、6、7题-----------");
        Equipment RedSword   = new Equipment(Equipment.EquipmentType.Sword, Equipment.EquipmentColor.Red, 20, 4, 80, 20);
        Equipment BlueShield = new Equipment(Equipment.EquipmentType.Shield, Equipment.EquipmentColor.Blue, 15, 15, 30, 90);

        Debug.Log("两件武器的面积和为" + GetEquipmentsArea(ref RedSword, ref BlueShield) + "平方寸。");
        Skill_RedLightAttack(1000, ref RedSword, ref BlueShield);

        Debug.Log("---------第8、9、10题-----------");
        XiCui xicui = new XiCui(1);

        SetXiCui_Price(ref xicui, 15);
        GetMaMaMoney(ref kindergarten, ref travel_Agency, ref xicui);
    }
示例#2
0
 //打印每一代的价格
 void SetXiCui_Price(ref XiCui xicui, int Gengeration)
 {
     while (Gengeration >= xicui.Price.Count)
     {
         xicui.Price.Add(xicui.Price[xicui.Price.Count - 1] * 2);
     }
     for (int i = 0; i < xicui.Price.Count; i++)
     {
         Debug.Log("第" + i + "代喜翠瓶的价格为" + xicui.Price[i] + "人民币。");
     }
 }
示例#3
0
    void GetMaMaMoney(ref Kindergarten kindergarten, ref Travel_Agency travel_Agency, ref XiCui xicui)
    {
        int Money = GetMaMaIncomings(ref kindergarten, ref travel_Agency) - (int)(xicui.Price[xicui.Price.Count - 1] * 0.8f);

        Debug.Log("园长妈妈这一趟下来一共赚了" + Money + "人民币。");
    }