public override void Combo3Damage() { CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.SpriteRendererNone(); Vector3 TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange; GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("Arrows3"), gameObject.transform.position, new Quaternion()); CArrows Arrows = LoadedObj.GetComponent <CArrows>(); Arrows.Owner = gameObject; Arrows.end_pos = TargetVec; Arrows.HitAniType = EHitAniType.Type3; SoundMgr.PlaySound("Missile", ESoundType.Motion); }
public override void Combo3Damage() { Vector3 TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right : gameObject.transform.position + Vector3.left; Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec); Vector3 pos = gameObject.transform.position; pos.x = gameObject.transform.position.x + (TargetVec.x - pos.x) / 2.0f; pos.z = 1.0f; GameObject melee_trail = Instantiate <GameObject>(CResourceMgr.LoadEffect("SwordTrail"), pos, newRotation); melee_trail.transform.localScale = new Vector3(2.0f, 2.0f, 1.0f); CTrail trail = melee_trail.GetComponent <CTrail>(); trail.Owner = gameObject; CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); trail.HitMove = ani.HitMove; trail.HitAniType = EHitAniType.Type3; ani.SpriteRendererNone(); SoundMgr.PlaySound("Attack", ESoundType.Motion); }
public override void ComboEnd() { base.ComboEnd(); if (bReservedCombo) { if (curState == EState.Combo1) { AllStopAni(); CCombo2Ani ani = gameObject.GetComponentInChildren <CCombo2Ani>(); ani.InitAngle(RotateAngle); ani.PlayAni(); curState = EState.Combo2; if (0.0f != ani.AttackMove) { Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos, true); } } else if (curState == EState.Combo2) { AllStopAni(); CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.InitAngle(RotateAngle); ani.PlayAni(); curState = EState.Combo3; if (0.0f != ani.AttackMove) { Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos, true); } } } bReservedCombo = false; }
public override void Attack2() { if (curHealthPoint < 11) { return; } if (curState == EState.Idle || curState == EState.Move) { AllStopAni(); CCombo3Ani ani = gameObject.GetComponentInChildren <CCombo3Ani>(); ani.PlayAni(); curState = EState.Combo3; if (ani.AttackMove != 0.0f) { Vector3 EndPos = gameObject.transform.position; EndPos.x = RotateAngle == 0.0f ? EndPos.x + ani.AttackMove : EndPos.x - ani.AttackMove; Move(gameObject.transform.position, EndPos, true); } curHealthPoint -= 10; } }