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); }