Example #1
0
 void Atk()
 {
     state = AtkState.atkend;
     parent.SetAnimatorState(InGameBaseCharacter.AnimatorState.Idle, 1);
     BaseSkill.CreateSkill(parent.GetBaseSkillID(), parent, (InGameBaseCharacter)target);
     //((InGameBaseCharacter)target).ChangeLife(-parent.GetAtkForce());
 }
Example #2
0
    void Atk()
    {
        state = ActionState.atkend;
        parent.SetAnimatorState(InGameBaseCharacter.AnimatorState.Idle, 1);
        if (target != null)
        {
            if (GameConst.CAMP_ATK[(int)target.camp, (int)parent.camp] == 0)
            {
                if (target.GetObjType() == InGameBaseObj.enObjType.map)
                {
                    InGameBaseMapObj mapobj = (InGameBaseMapObj)target;
                    bool             isdie  = mapobj.Hurt(parent);
                    if (isdie)
                    {
                        state = ActionState.non;
                        return;
                    }
                }
            }
            else
            {
                BaseSkill.CreateSkill(parent.GetBaseSkillID(), parent, (InGameBaseCharacter)target);
            }
        }

        //((InGameBaseCharacter)target).ChangeLife(-parent.GetAtkForce());
    }