コード例 #1
0
        protected override void TickTasks()
        {
            if (!OutsideCombatOrActive())
            {
                return;
            }

            switch (CurrentTask.Type)
            {
            case Task.Types.Attack:
            case Task.Types.BreakableAttack:
                //enter combat if i am attacking someone
                if (!CombatManager.IsEnabled)
                {
                    CombatManager.StartCombat(this);
                }
                break;

            case Task.Types.Heal:
                //apply the healing thing
                DoNextTask();
                break;
            }

            base.TickTasks();
        }
コード例 #2
0
        public override void ItemClick()
        {
            switch (GetCurActionMode().Command)
            {
            case "reload":
                TryReload();
                break;

            case "attack":
                (Owner.Intellect as RTSUnitAI).DoTask(new RTSUnitAI.Task(RTSUnitAI.Task.Types.PreUse), false);
                CombatManager.StartCombat(Owner.Intellect as VBUnitAI);
                break;

            default:
                base.ItemClick();
                break;
            }
        }
コード例 #3
0
 public override void ItemClick()
 {
     (Owner.Intellect as RTSUnitAI).DoTask(new RTSUnitAI.Task(RTSUnitAI.Task.Types.PreUse), false);
     CombatManager.StartCombat(Owner.Intellect as VBUnitAI);
 }