示例#1
0
        public virtual void Fire()
        {
            DebugUtils.Log(DebugUtils.Type.AI_Skill, string.Format("Skill {0} has been Fire, id = {1}", skillName, id));

            if (DependOnSkillState())
            {
                DebugUtils.Log(DebugUtils.Type.AI_Soldier, "soldier " + owner.id + " enters skill state.");

                owner.ChangeState(SoldierState.SKILL, owner.fsmSkill);
            }
        }
示例#2
0
        public override void Update(int deltaTime)
        {
            base.Update(deltaTime);

            if (bornTimer >= bornTime)
            {
                DebugUtils.Log(DebugUtils.Type.AI_Soldier, string.Format("soldier {0} enters idle state", owner.id));

                owner.BornComplete();
                owner.ChangeState(SoldierState.IDLE, owner.fsmIdle);
            }

            bornTimer += deltaTime;
        }
示例#3
0
        public override void Detach()
        {
            base.Detach();

            DebugUtils.Log(DebugUtils.Type.AI_AttributeEffect, string.Format(" {0} {1} has been detached", type, attributeAffectType));

            if (soldier.GetFlag(SoldierAttributeFlags.BanSkill))
            {
                soldier.RemoveFlag(SoldierAttributeFlags.BanSkill);
            }
            soldier.skillHandler.SetHandlerEnabled(true);

            if (soldier.GetFlag(SoldierAttributeFlags.BanCommand))
            {
                soldier.RemoveFlag(SoldierAttributeFlags.BanCommand);
            }

            soldier.target = null;
            soldier.ChangeState(1, soldier.fsmIdle);
            ownerDebuff.sneerEffect = null;
        }