견습 사냥꾼 : 제멋대로 화살
This commit is contained in:
parent
4747797b67
commit
bf867eb6b3
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -49,6 +49,32 @@ AnimatorState:
|
|||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &-3345267492842650449
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: skill1_start
|
||||
m_Speed: 0
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400006, guid: 98b73bf7c5c7d2246938376e2f932063, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-2242026176269797008
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
|
|
@ -1768,6 +1794,12 @@ AnimatorStateMachine:
|
|||
- serializedVersion: 1
|
||||
m_State: {fileID: 4804184176358769930}
|
||||
m_Position: {x: -30, y: -460, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -3345267492842650449}
|
||||
m_Position: {x: -250, y: -160, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3962034511655292697}
|
||||
m_Position: {x: -250, y: -110, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
|
|
@ -1951,6 +1983,32 @@ AnimatorStateTransition:
|
|||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &3962034511655292697
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: skill1_loop
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400006, guid: db906de96af58b144b0a7ae4b6ab0cf1, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &4804184176358769930
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3433868373206104d9480858ef097d6e
|
||||
timeCreated: 1530028261
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -9,6 +9,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6590243242215366880}
|
||||
- component: {fileID: 6013781874958528140}
|
||||
m_Layer: 0
|
||||
m_Name: Skill_UnpredictableArrow
|
||||
m_TagString: Untagged
|
||||
|
|
@ -32,6 +33,27 @@ Transform:
|
|||
- {fileID: 6934076800316010835}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6013781874958528140
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1185430922526355785}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7099348e8f648e14fa729b6de395d949, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Pierce: 0
|
||||
str_HitEffect:
|
||||
projectile_prefab: Projectile_RookieArcherSkill1
|
||||
m_count: 15
|
||||
m_speed: 4
|
||||
MinwaveAmplitude: 0
|
||||
MaxwaveAmplitude: 2
|
||||
MinwaveFrequency: 2
|
||||
MaxwaveFrequency: 6
|
||||
--- !u!1 &6930372552951915573
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class Projectile_Curved : ProjectileBase
|
||||
{
|
||||
public Transform startPoint; // 시작 지점
|
||||
public Transform endPoint; // 목표 지점
|
||||
public float curveHeight = 2f; // 곡선의 높이
|
||||
public float duration = 1f; // 투사체가 이동하는 데 걸리는 시간
|
||||
|
||||
public void Launch(Vector3 start, Vector3 end)
|
||||
{
|
||||
startPoint.position = start;
|
||||
endPoint.position = end;
|
||||
StartCoroutine(MoveAlongCurve());
|
||||
}
|
||||
|
||||
private IEnumerator MoveAlongCurve()
|
||||
{
|
||||
float elapsedTime = 0f;
|
||||
|
||||
Vector3 controlPoint = (startPoint.position + endPoint.position) / 2; // 시작과 끝의 중간 지점
|
||||
controlPoint += Vector3.up * curveHeight; // 곡선 높이 추가
|
||||
|
||||
while (elapsedTime < duration)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
float t = elapsedTime / duration;
|
||||
|
||||
// 베지어 곡선 계산
|
||||
Vector3 pointOnCurve = Mathf.Pow(1 - t, 2) * startPoint.position +
|
||||
2 * (1 - t) * t * controlPoint +
|
||||
Mathf.Pow(t, 2) * endPoint.position;
|
||||
|
||||
// 투사체 위치 이동
|
||||
transform.position = pointOnCurve;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// 이동이 끝난 후 투사체 삭제
|
||||
Off(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 67e3b0730f76b974489bd85bc21215fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class Projectile_WaveMove : ProjectileBase
|
||||
{
|
||||
/// <summary>
|
||||
/// waveAmplitude : 좌우 진폭 (X축 흔들림의 크기)
|
||||
/// waveFrequency : 좌우 주파수 (X축 흔들림의 속도)
|
||||
/// </summary>
|
||||
public override void Launch(Vector3 start, Vector3 end, float wavePhase, float waveAmplitude, float waveFrequency)
|
||||
{
|
||||
StartCoroutine(MoveWithWave(start, end, wavePhase, waveAmplitude, waveFrequency));
|
||||
}
|
||||
|
||||
private IEnumerator MoveWithWave(Vector3 start, Vector3 end, float wavePhase, float waveAmplitude, float waveFrequency)
|
||||
{
|
||||
float elapsedTime = 0f;
|
||||
float totalDistance = Vector3.Distance(start, end);
|
||||
Vector3 direction = (end - start).normalized; // 목표 지점으로의 방향
|
||||
|
||||
while (elapsedTime * m_ProjectTileData.Speed < totalDistance)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
|
||||
// 현재 직선상의 위치
|
||||
Vector3 linearPosition = start + direction * (elapsedTime * m_ProjectTileData.Speed);
|
||||
|
||||
// 사인파로 X축 좌우 흔들림 추가
|
||||
float waveOffsetX = Mathf.Sin(elapsedTime * waveFrequency + wavePhase) * waveAmplitude;
|
||||
|
||||
// 최종 위치: 흔들림 추가
|
||||
Vector3 wavyPosition = linearPosition + new Vector3(waveOffsetX, 0f, 0f);
|
||||
|
||||
transform.position = wavyPosition;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// 목표 지점 도달 후 투사체 삭제
|
||||
Off(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 59339fad92544804eaf7792e70012580
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -184,6 +184,7 @@ public class ProjectileBase : MonoBehaviour
|
|||
else if (_data.LookTarget)
|
||||
transform.eulerAngles = _data.shooter.transform.eulerAngles;
|
||||
}
|
||||
public virtual void Launch(Vector3 start, Vector3 end, float wavePhase, float waveAmplitude, float waveFrequency) { }
|
||||
|
||||
protected void LookAt_ShooterFoward()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,12 +3,44 @@ using UnityEngine;
|
|||
|
||||
public class Skill_UnpredictableArrow : ProjectileBase
|
||||
{
|
||||
[Header("투사체 프리팹")]
|
||||
public string projectile_prefab = "Projectile_RookieArcherSkill1";
|
||||
[Header("투사체 갯수")]
|
||||
public int m_count = 10;
|
||||
[Header("투사체 속도")]
|
||||
public float m_speed = 1.5f;
|
||||
[Header("최소 좌우 진폭")]
|
||||
public float MinwaveAmplitude = 0f;
|
||||
[Header("최대 좌우 진폭")]
|
||||
public float MaxwaveAmplitude = 2f;
|
||||
[Header("최소 좌우 주파수")]
|
||||
public float MinwaveFrequency = 1f;
|
||||
[Header("최대 좌우 주파수")]
|
||||
public float MaxwaveFrequency = 3f;
|
||||
|
||||
public override void Set(ProjectileData _data)
|
||||
{
|
||||
_data.eStartPos = eProjectileStartPos.Custom;
|
||||
_data.v3_StartPos = _data.target.Get_position();
|
||||
_data.eStartPos = eProjectileStartPos.ShooterCenter;
|
||||
_data.Speed = m_speed;
|
||||
base.Set(_data);
|
||||
StartCoroutine(Co_Update());
|
||||
}
|
||||
|
||||
StartCoroutine(Co_Off(5f));
|
||||
IEnumerator Co_Update()
|
||||
{
|
||||
m_ProjectTileData.shooter.AnimationPlay("skill1_loop");
|
||||
for (int i = 0; i < m_count; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.25f);
|
||||
ProjectileInfo.Ins.Shoot_Projectile(projectile_prefab, m_ProjectTileData, pb =>
|
||||
{
|
||||
pb.transform.localScale = Vector3.one * 0.5f;
|
||||
var target = m_ProjectTileData.shooter.Get_CenterPositionFoward(Random.Range(3f, 6f));
|
||||
var Amplitude = Random.Range(MinwaveAmplitude, MaxwaveAmplitude);
|
||||
var Frequency = Random.Range(MinwaveFrequency, MaxwaveFrequency);
|
||||
pb.Launch(transform.position, target, Random.value > 0.5f ? 0f : Mathf.PI, Amplitude, Frequency);
|
||||
});
|
||||
}
|
||||
m_ProjectTileData.shooter.Play_Idle();
|
||||
}
|
||||
}
|
||||
|
|
@ -199,9 +199,14 @@ public enum eEffect
|
|||
Skill_SpeedUp, Skill_Ignited, Skill_Heal, Skill_Buff_FastShot, Skill_MeteoStorm, Skill_StatUp, Skill_HeavyRain,
|
||||
Skill_Shield, Skill_Bead, Skill_ExplosionArea, Skill_SpiritBless, Skill_SwordShield, Skill_StraightBurst, Skill_Resurrection,
|
||||
Skill_IceBolt, Skill_Fireball, Skill_FireBolt, Skill_EnergyBall, Skill_Blizzard, Skill_Flower, Skill_Golem, Skill_EarthWorm,
|
||||
Skill_Hurricane, Skill_EatSnack, Skill_ShieldAttack, Skill_JumpAttack, Skill_ManaBurst, Skill_DaggerThrow, Skill_OneHandCombo1,
|
||||
Skill_FatalBlow, Skill_DashSlash, Skill_EnergySlash, Skill_BrutalSlash, Skill_Berserk, Skill_EarthSlam, Skill_Whirlwind,
|
||||
Skill_SweepAttack, Skill_VitalStrike, Skill_DeathBlade, Skill_ShadowSlash, Skill_DarkAmbush, Skill_PhantomFrenzy,
|
||||
Skill_Hurricane, Skill_EatSnack, Skill_ShieldAttack, Skill_JumpAttack, Skill_ManaBurst,
|
||||
|
||||
Skill_DaggerThrow, Skill_OneHandCombo1, Skill_FatalBlow,
|
||||
Skill_DashSlash, Skill_EnergySlash, Skill_BrutalSlash,
|
||||
Skill_Berserk, Skill_EarthSlam, Skill_Whirlwind,
|
||||
Skill_SweepAttack, Skill_VitalStrike, Skill_DeathBlade,
|
||||
Skill_ShadowSlash, Skill_DarkAmbush, Skill_PhantomFrenzy,
|
||||
Skill_UnpredictableArrow,
|
||||
|
||||
Skill_Poison,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue