/// <summary> /// 변수 정보 반환 /// </summary> /// <param name="coll"></param> void SendDamege() { effectMng.PlayEffect(EffectKind.Attack1, middle.position); uiMng.SetHp(this, -100); playerAni.SetTrigger("IsDamage"); isDamage = true; if (isAction) { SetDefaultActionState(); } }
private void OnTriggerEnter2D(Collider2D coll) { if (coll.gameObject.name == "middle") { //중화가 추가해준 코드 if (isGuard) { Debug.Log("GUARD SUCCEES"); effectMng.PlayEffect(EffectKind.Guard1, coll.transform.position); return; } else { Debug.Log("GUARD FAILED"); } // if (isJump) { if (ctrlType == CtrlType.One && !isturn) { myRb.velocity = new Vector2(-16, myRb.velocity.y); } else if (ctrlType == CtrlType.One && isturn) { myRb.velocity = new Vector2(16, myRb.velocity.y); } if (ctrlType == CtrlType.Two && !isturn) { myRb.velocity = new Vector2(16, myRb.velocity.y); } else if (ctrlType == CtrlType.One && isturn) { myRb.velocity = new Vector2(-16, myRb.velocity.y); } } effectMng.PlayEffect(EffectKind.Attack1, middle.position); uiMng.SetHp(this, -100); playerAni.SetTrigger("IsDamage"); isDamage = true; if (isAction) { SetDefaultActionState(); } } }