Esempio n. 1
0
    public override void MyUpdate()
    {
        if (canBeFighted.getAttackNum() > 0)
        {
            if (MustDropOut)
            {
                Debug.Log("丢出东西, canBeFighted.AttNum = " + canBeFighted.getAttackNum());

                DropOut(Thing1, Thing1Number);
                DropOut(Thing2, Thing2Number);
                DropOut(Thing3, Thing3Number);
                DropOut(Thing4, Thing4Number);
                DropOut(Thing5, Thing5Number);
            }
            if (RandomlyDropOut)
            {
                int randomChoice;
                for (int i = 0; i < canBeFighted.getAttackNum(); i++)
                {
                    randomChoice = Random.Range(0, randomThingNumber);
                    DropOut(randomThingName[randomChoice], 1);
                }
            }
        }
        canBeFighted.Clear();
    }
Esempio n. 2
0
 //将下一帧的hasSetStatistic设置为false,并清除CanBeFighted的数据
 public virtual void Clear()
 {
     hasSetStatistic = false;
     attackedCheck.Clear();
 }