public override void Combo2Damage() { CCombo2Ani ani = gameObject.GetComponentInChildren <CCombo2Ani>(); 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("Arrows2"), gameObject.transform.position, new Quaternion()); CArrows Arrows = LoadedObj.GetComponent <CArrows>(); Arrows.Owner = gameObject; Arrows.end_pos = TargetVec; Arrows.HitAniType = EHitAniType.Type2; SoundMgr.PlaySound("Missile2", ESoundType.Motion); }
public override void Combo2Damage() { Vector3 TargetVec = RotateAngle == 0.0f ? gameObject.transform.position + Vector3.right * AttackRange : gameObject.transform.position + Vector3.left * AttackRange; Quaternion newRotation = CUtility.MakeQuaternion(gameObject.transform.position, TargetVec); // 이미지를 반시계방향으로 회전 시켜서 위로 바라 보게 만든다. Vector3 eulerAngles = newRotation.eulerAngles; eulerAngles.z += 90.0f; newRotation = Quaternion.Euler(eulerAngles); GameObject LoadedObj = Instantiate <GameObject>(CResourceMgr.LoadEffect("Bone"), gameObject.transform.position, newRotation); CBone Effect = LoadedObj.GetComponent <CBone>(); Effect.Owner = gameObject; Effect.EndPos = TargetVec; CCombo2Ani ani = gameObject.GetComponentInChildren <CCombo2Ani>(); Effect.HitMove = ani.HitMove; Effect.HitAniType = EHitAniType.Type1; //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("MeleeTrail"), pos, newRotation); //CTrail trail = melee_trail.GetComponent<CTrail>(); //trail.Owner = gameObject; //CCombo2Ani ani = gameObject.GetComponentInChildren<CCombo2Ani>(); //trail.HitMove = ani.HitMove; //trail.HitAniType = EHitAniType.Type2; ani.SpriteRendererNone(); SoundMgr.PlaySound("Attack2", ESoundType.Motion); }