public override void Attack(GameObject target) { if (Behaviable.bCanAttack == true) { Behaviable.bCanAttack = false; Invoke("InvokeSetBCanAttackTrue", (float)DelayAttack); Damage(target, Power); ConditionAnimator.SetInteger("Condition", 2); } }
public void MultipleSkillAttack(List <GameObject> targets) { if (Behaviable.bCanMultipleSkill == true) { Behaviable.bCanMultipleSkill = false; Invoke("InvokeSetBCanMultipleSkillTrue", (float)DelayMultipleSkill); for (int i = 0; i < targets.Count; ++i) { Damage(targets[i], MultipleSkillPower); } ConditionAnimator.SetInteger("Condition", 4); } }
public void SingleSkillAttack(GameObject target) { if (Behaviable.bCanSingleSkill == true) { Behaviable.bCanSingleSkill = false; Invoke("InvokeSetBCanSingleSkillTrue", (float)DelaySingleSkill); if (target != null) { Damage(target, SingleSkillPower); } ConditionAnimator.SetInteger("Condition", 3); } }
public void Move(float h, float v) { Vector3 MoveDirection = new Vector3(); MoveDirection.x = h * (float)Speed * Time.deltaTime; MoveDirection.y = v * (float)Speed * Time.deltaTime; transform.Translate(MoveDirection); if (Behaviable.bCanAttack == true) { if (MoveDirection.magnitude <= 0.001) { ConditionAnimator.SetInteger("Condition", 0); } else { ConditionAnimator.SetInteger("Condition", 1); } } }
public IEnumerator SpeedSkill() { if (Behaviable.bCanSpeedSkill == true) { for (int i = 1; i <= 3; ++i) { Behaviable.bCanSpeedSkill = false; Invoke("InvokeSetBCanSpeedSkillTrue", (float)DelaySkillSpeed); Vector3 DashDirection = new Vector3(Input.GetAxisRaw("Horizontal") * (float)SkillSpeed * Time.deltaTime, Input.GetAxisRaw("Vertical") * (float)SkillSpeed * Time.deltaTime, 0); transform.Translate(DashDirection); WaitForSeconds WFS = new WaitForSeconds(0.1f); yield return(WFS); } ConditionAnimator.SetInteger("Condition", 5); } }