示例#1
0
    void onIdleTimer(Timer.Node tn)
    {
        switch (tn.timerID)
        {
        case TimerDectect:
            if (mUnit.attr.HP < warnningHP && warnningHP > 0)
            {
                tn.loop(1f);
                break;
            }

            if (findTarget())
            {
                next = Cmd.Attack;
            }
            else
            {
                tn.loop(0.1f);
            }
            break;

        case TimerWakeup:
            next = Cmd.Patrol;
            break;
        }
    }
示例#2
0
 void onFleeTimer(Timer.Node tn)
 {
 }
示例#3
0
 void onTraceTimer(Timer.Node tn)
 {
 }
示例#4
0
 void onAttackTimer(Timer.Node tn)
 {
 }
示例#5
0
 void onTimer(Timer.Node timer)
 {
     sendUnitEvent((int)UnitEvent.Timer, timer);
 }