Merge branch 'main' of https://github.com/Degulleo/Degulleo3D into DEG-18-플레이어-공격-기능-구현
This commit is contained in:
commit
e7169065cc
@ -1,8 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb977eee32cc2024181234437bfb8480
|
||||
guid: 612dfb3f3c0e45e3aaa9d5def5189516
|
||||
timeCreated: 1744852718
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
|
83
Assets/Editor/EnemyControllerEditor.cs
Normal file
83
Assets/Editor/EnemyControllerEditor.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(PldDogController))]
|
||||
public class EnemyControllerEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// 기본 인스펙터를 그리기
|
||||
base.OnInspectorGUI();
|
||||
|
||||
// 타겟 컴포넌트 참조 가져오기
|
||||
EnemyController enemyController = (EnemyController)target;
|
||||
|
||||
// 여백 추가
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("상태 디버그 정보", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// 상태별 색상 지정
|
||||
switch (enemyController.CurrentState)
|
||||
{
|
||||
case EnemyState.Idle:
|
||||
GUI.backgroundColor = new Color(0, 0, 1, 1f);
|
||||
break;
|
||||
case EnemyState.Trace:
|
||||
GUI.backgroundColor = new Color(1, 0, 1, 1f);
|
||||
break;
|
||||
case EnemyState.Attack:
|
||||
GUI.backgroundColor = new Color(1, 1, 0, 1f);
|
||||
break;
|
||||
case EnemyState.Move:
|
||||
GUI.backgroundColor = new Color(0, 1, 1, 1f);
|
||||
break;
|
||||
case EnemyState.GetHit:
|
||||
GUI.backgroundColor = new Color(0.1f, 0.1f, 0.1f, 1f);
|
||||
break;
|
||||
case EnemyState.Dead:
|
||||
GUI.backgroundColor = new Color(1, 0, 0, 1f);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
EditorGUILayout.LabelField("현재 상태", enemyController.CurrentState.ToString(),
|
||||
EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
GUI.backgroundColor= Color.clear;
|
||||
EditorGUILayout.LabelField("상태 변경", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Idle")) enemyController.SetState(EnemyState.Idle);
|
||||
if (GUILayout.Button("Trace")) enemyController.SetState(EnemyState.Trace);
|
||||
if (GUILayout.Button("Attack")) enemyController.SetState(EnemyState.Attack);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Move")) enemyController.SetState(EnemyState.Move);
|
||||
if (GUILayout.Button("GetHit")) enemyController.SetState(EnemyState.GetHit);
|
||||
if (GUILayout.Button("Dead")) enemyController.SetState(EnemyState.Dead);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
EditorApplication.update += OnEditorUpdate;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EditorApplication.update -= OnEditorUpdate;
|
||||
}
|
||||
|
||||
private void OnEditorUpdate()
|
||||
{
|
||||
if (target != null)
|
||||
Repaint();
|
||||
}
|
||||
}
|
3
Assets/Editor/EnemyControllerEditor.cs.meta
Normal file
3
Assets/Editor/EnemyControllerEditor.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e73fc154fc447fea93336f02b6df5ea
|
||||
timeCreated: 1744852745
|
@ -1,24 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
// PlayerStatsTest.ReadOnlyAttribute를 위한 에디터 속성 드로어
|
||||
[CustomPropertyDrawer(typeof(PlayerStatsTest.ReadOnlyAttribute))]
|
||||
public class ReadOnlyDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
// 이전 GUI 활성화 상태 저장
|
||||
bool wasEnabled = GUI.enabled;
|
||||
|
||||
// 필드 비활성화 (읽기 전용)
|
||||
GUI.enabled = false;
|
||||
|
||||
// 속성 그리기
|
||||
EditorGUI.PropertyField(position, property, label, true);
|
||||
|
||||
// GUI 활성화 상태 복원
|
||||
GUI.enabled = wasEnabled;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 533241c82a79dcc46932391bf865ce21
|
||||
guid: 705f5cc824e16644497801b43f81b1c1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
BIN
Assets/JYY/Animation/Attack01 Slash.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Attack01 Slash.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Attack01 Slash.anim.meta
Normal file
8
Assets/JYY/Animation/Attack01 Slash.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df0c94f0a0eae85438a0bfc0deea8791
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Attack01.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Attack01.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Attack01.anim.meta
Normal file
8
Assets/JYY/Animation/Attack01.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34b2cc555a0977644ab2d9e2350a939d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Attack02.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Attack02.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Attack02.anim.meta
Normal file
8
Assets/JYY/Animation/Attack02.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eccbae3cfc77ad245ade46e143aa3200
|
||||
timeCreated: 1544605040
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Defend.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Defend.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Defend.anim.meta
Normal file
8
Assets/JYY/Animation/Defend.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf357b5409b4ad54a82c45d7684564e1
|
||||
timeCreated: 1544607741
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Die.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Die.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Die.anim.meta
Normal file
8
Assets/JYY/Animation/Die.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d190d8211c88a64281f7b90c69f3eb3
|
||||
timeCreated: 1544605073
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/DieRecover.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/DieRecover.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/DieRecover.anim.meta
Normal file
8
Assets/JYY/Animation/DieRecover.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a3671dbe6670524b8b6d9ad3664c179
|
||||
timeCreated: 1544607752
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Dizzy.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Dizzy.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Dizzy.anim.meta
Normal file
8
Assets/JYY/Animation/Dizzy.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30d4fe7af77240a44b9354aaed8e5beb
|
||||
timeCreated: 1544607757
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/GetHit.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/GetHit.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/GetHit.anim.meta
Normal file
8
Assets/JYY/Animation/GetHit.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1588532e68f51a040bda71c68cfab177
|
||||
timeCreated: 1544605085
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/Idle_Battle.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/Idle_Battle.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/Idle_Battle.anim.meta
Normal file
8
Assets/JYY/Animation/Idle_Battle.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b79ff7bb68348be479d3db6b7fe8a569
|
||||
timeCreated: 1544605090
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/RunForwardBattle.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/RunForwardBattle.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/RunForwardBattle.anim.meta
Normal file
8
Assets/JYY/Animation/RunForwardBattle.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f0e03164414016409d28995a128ba98
|
||||
timeCreated: 1544605137
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/ShakeSwordVerti.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/ShakeSwordVerti.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/ShakeSwordVerti.anim.meta
Normal file
8
Assets/JYY/Animation/ShakeSwordVerti.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cda71f7a8c35a448a6e9999adab5bc1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/WalkForwardBattle.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/WalkForwardBattle.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/WalkForwardBattle.anim.meta
Normal file
8
Assets/JYY/Animation/WalkForwardBattle.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0c8c1d913b359a428b42d53947d3e93
|
||||
timeCreated: 1544607284
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Animation/WindUp.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Animation/WindUp.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Animation/WindUp.anim.meta
Normal file
8
Assets/JYY/Animation/WindUp.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d4a1a2c3f67c5c45a3a85dbf83e008b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/JYY/Animator.meta
Normal file
8
Assets/JYY/Animator.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47617fd7d9aae9841b8df03a9c71aab2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/JYY/Animator/PldDogControl.controller
Normal file
3
Assets/JYY/Animator/PldDogControl.controller
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b9e37c8d0a91f3599d34a7715c632cbcf76fd3c0a96c5d5335ab9d6ff65d3b4c
|
||||
size 18916
|
8
Assets/JYY/Animator/PldDogControl.controller.meta
Normal file
8
Assets/JYY/Animator/PldDogControl.controller.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a0b0196c516e454bbdb102f6dba08cf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/JYY/Materials.meta
Normal file
8
Assets/JYY/Materials.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e841b33c73e8fd44a8cf0bc9c1ae488
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Materials/AOEIndicatorChariot.mat
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Materials/AOEIndicatorChariot.mat
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Materials/AOEIndicatorChariot.mat.meta
Normal file
8
Assets/JYY/Materials/AOEIndicatorChariot.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 478a013fb343575418a252ed84af0c58
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Materials/AOEIndicatorDynamo.mat
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Materials/AOEIndicatorDynamo.mat
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Materials/AOEIndicatorDynamo.mat.meta
Normal file
8
Assets/JYY/Materials/AOEIndicatorDynamo.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10d4d2e86cc374845a5268c025ab7c9b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Materials/AOEIndicatorHorizontal.mat
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Materials/AOEIndicatorHorizontal.mat
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Materials/AOEIndicatorHorizontal.mat.meta
Normal file
8
Assets/JYY/Materials/AOEIndicatorHorizontal.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdb8e6efac281d245a59752551f80076
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Materials/AOEIndicatorVertical.mat
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Materials/AOEIndicatorVertical.mat
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JYY/Materials/AOEIndicatorVertical.mat.meta
Normal file
8
Assets/JYY/Materials/AOEIndicatorVertical.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d7ccfbc83f505c4abd39cdc31630463
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/JYY/Prefabs.meta
Normal file
8
Assets/JYY/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 622537ed9949f364799229e66b81e7e0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Prefabs/AOEIndicator.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Prefabs/AOEIndicator.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90448f678f8c503408de14c38cd7c653
|
||||
guid: 36d2fcfec062c074ba2dad3a0b0116be
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
BIN
Assets/JYY/Prefabs/AOEIndicatorChariot.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Prefabs/AOEIndicatorChariot.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/JYY/Prefabs/AOEIndicatorChariot.prefab.meta
Normal file
7
Assets/JYY/Prefabs/AOEIndicatorChariot.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9e020ef2784edf4ca2a83ae9e1edefd
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Prefabs/AOEIndicatorDynamo.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Prefabs/AOEIndicatorDynamo.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/JYY/Prefabs/AOEIndicatorDynamo.prefab.meta
Normal file
7
Assets/JYY/Prefabs/AOEIndicatorDynamo.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12018c889dca23d46a0d3807213c6a79
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/JYY/Prefabs/AOEIndicatorHorizontal.prefab
Normal file
3
Assets/JYY/Prefabs/AOEIndicatorHorizontal.prefab
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5dfaa59aeffa4e948edd40e96f05e2c708e491bb80c2a3446d9d1335b05adf0
|
||||
size 3995
|
7
Assets/JYY/Prefabs/AOEIndicatorHorizontal.prefab.meta
Normal file
7
Assets/JYY/Prefabs/AOEIndicatorHorizontal.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44d67bf59c049fb46876a549120a16d7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Prefabs/AOEIndicatorVertical.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Prefabs/AOEIndicatorVertical.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/JYY/Prefabs/AOEIndicatorVertical.prefab.meta
Normal file
7
Assets/JYY/Prefabs/AOEIndicatorVertical.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9adff7c5e2e43974fa9f2d241ef2e433
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/JYY/Prefabs/[Enemy] PldDog.prefab
Normal file
3
Assets/JYY/Prefabs/[Enemy] PldDog.prefab
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c7b23e4a2f6475f6cfe0641a03fd4415fe2b732fe649a14f93b72ea104f250f3
|
||||
size 80026
|
7
Assets/JYY/Prefabs/[Enemy] PldDog.prefab.meta
Normal file
7
Assets/JYY/Prefabs/[Enemy] PldDog.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84456bef5d2de2149ade477b93bc9ea0
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/JYY/Scenes/MonsterTest.meta
Normal file
8
Assets/JYY/Scenes/MonsterTest.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f736a70ba6c488a48b743638353258e9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5c3fd6cb0241bd3da476e5c911552fc2fe06e6e12775af7da0145389a8ab1f2
|
||||
size 89686
|
||||
oid sha256:ec97ec66df4283ed273c243f4aa1642c492661d1163184ce650d833e5a36bd87
|
||||
size 19269
|
||||
|
BIN
Assets/JYY/Scenes/MonsterTest/NavMesh-Plane.asset
Normal file
BIN
Assets/JYY/Scenes/MonsterTest/NavMesh-Plane.asset
Normal file
Binary file not shown.
8
Assets/JYY/Scenes/MonsterTest/NavMesh-Plane.asset.meta
Normal file
8
Assets/JYY/Scenes/MonsterTest/NavMesh-Plane.asset.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ea1affa28401cb4388633bac551449a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 23800000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/JYY/Sprites.meta
Normal file
8
Assets/JYY/Sprites.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7dcd0a2efc35e04287877979738ea37
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Sprites/AOEIndicator.png
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Sprites/AOEIndicator.png
(Stored with Git LFS)
Normal file
Binary file not shown.
127
Assets/JYY/Sprites/AOEIndicator.png.meta
Normal file
127
Assets/JYY/Sprites/AOEIndicator.png.meta
Normal file
@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fab9fda9e2e50b1458af69d2b01d167c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Sprites/AOEIndicatorDynamo.png
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Sprites/AOEIndicatorDynamo.png
(Stored with Git LFS)
Normal file
Binary file not shown.
127
Assets/JYY/Sprites/AOEIndicatorDynamo.png.meta
Normal file
127
Assets/JYY/Sprites/AOEIndicatorDynamo.png.meta
Normal file
@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5e22a589905e4d45b9b2cdec3f43271
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Sprites/AOEIndicatorHorizontal.png
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Sprites/AOEIndicatorHorizontal.png
(Stored with Git LFS)
Normal file
Binary file not shown.
127
Assets/JYY/Sprites/AOEIndicatorHorizontal.png.meta
Normal file
127
Assets/JYY/Sprites/AOEIndicatorHorizontal.png.meta
Normal file
@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63954103bdc17f042bbabad6acdbbc65
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JYY/Sprites/AOEIndicatorVertical.png
(Stored with Git LFS)
Normal file
BIN
Assets/JYY/Sprites/AOEIndicatorVertical.png
(Stored with Git LFS)
Normal file
Binary file not shown.
127
Assets/JYY/Sprites/AOEIndicatorVertical.png.meta
Normal file
127
Assets/JYY/Sprites/AOEIndicatorVertical.png.meta
Normal file
@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf8a73df42451cb408f68dca120806e1
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/KJM.meta
Normal file
8
Assets/KJM.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbfd37452c39a544895c4f842901be82
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/KJM/KJM.unity
(Stored with Git LFS)
Normal file
BIN
Assets/KJM/KJM.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/KJM/KJM.unity.meta
Normal file
7
Assets/KJM/KJM.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fce4c0b08a429b64695c3c0aed06df0f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/KJM/KJM_Test.meta
Normal file
8
Assets/KJM/KJM_Test.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf313a0298660aa4db16ced680557810
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
43
Assets/KJM/KJM_Test/Save.cs
Normal file
43
Assets/KJM/KJM_Test/Save.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// 던전 관련 저장 데이터
|
||||
[Serializable]
|
||||
public class DungeonSave
|
||||
{
|
||||
// 강화 수치
|
||||
public int attackLevel;
|
||||
public int attackSpeedLevel;
|
||||
public int heartLevel;
|
||||
public int moveSpeedLevel;
|
||||
public int evasionTimeLevel;
|
||||
|
||||
// 현재 진행 중인 스테이지
|
||||
public int stageLevel;
|
||||
}
|
||||
|
||||
// 일상(자취방) 관련 저장 데이터
|
||||
[Serializable]
|
||||
public class HomeSave
|
||||
{
|
||||
// 일상 시간
|
||||
public float time;
|
||||
public int day;
|
||||
|
||||
// 체력 및 평판 수치
|
||||
public float health;
|
||||
public float reputation;
|
||||
|
||||
//이벤트
|
||||
public bool isEvent;
|
||||
public int mealCount;
|
||||
public int houseworkCount;
|
||||
}
|
||||
|
||||
// 게임 전체 저장 구조
|
||||
[Serializable]
|
||||
public class Save
|
||||
{
|
||||
public HomeSave homeSave;
|
||||
public DungeonSave dungeonSave;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae7f2b39529d58a4fa75cf1d30dae9be
|
||||
guid: 883ac325bc606014fa78662a7b7ec954
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
188
Assets/KJM/KJM_Test/SaveManager.cs
Normal file
188
Assets/KJM/KJM_Test/SaveManager.cs
Normal file
@ -0,0 +1,188 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CI.QuickSave;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SaveManager : Singleton<SaveManager>
|
||||
{
|
||||
private const string SaveFolder = "QuickSave";
|
||||
private string MainSaveFilePath => GetSavePath("Save_Main");
|
||||
private string BackupSaveFilePath => GetSavePath("Save_Backup");
|
||||
|
||||
|
||||
private Save mainSave;
|
||||
private Save backupSave;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
Load(); //저장된 메인,백업 세이브를 로드
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
if(JsonUtility.ToJson(mainSave) == JsonUtility.ToJson(StatManager.instance.ToSaveData())) //같은 상태는 저장되지 않음. 백업 덮어쓰기 방지.
|
||||
return;
|
||||
|
||||
EnsureSaveExists();
|
||||
|
||||
backupSave = LoadMain(); //메인 세이브를 백업 세이브에 로드
|
||||
SaveBackup(); //백업 세이브 저장
|
||||
UpdateSaveInfo(); //세이브를 현재 정보로 업데이트
|
||||
SaveMain(); //메인 세이브 저장
|
||||
|
||||
Debug.Log("세이브 되었습니다.");
|
||||
}
|
||||
|
||||
public void Load()
|
||||
{
|
||||
EnsureSaveExists();
|
||||
|
||||
mainSave = LoadMain();
|
||||
backupSave = LoadBackup();
|
||||
|
||||
StatManager.instance.loadSaveData2StataManager(mainSave);
|
||||
|
||||
Debug.Log("메인 로드" + mainSave.homeSave.reputation); //임시 코드
|
||||
Debug.Log("백업 로드" + backupSave.homeSave.reputation); //임시 코드
|
||||
}
|
||||
|
||||
private void UpdateSaveInfo()
|
||||
{
|
||||
mainSave = StatManager.instance.ToSaveData(); //스탯을 관리하는 클래스에 선언된 스탯 업데이트 함수를 호출
|
||||
}
|
||||
|
||||
private void SaveMain()
|
||||
{
|
||||
QuickSaveWriter.Create("Save_Main")
|
||||
.Write("Main", mainSave)
|
||||
.Commit();
|
||||
}
|
||||
|
||||
private void SaveBackup()
|
||||
{
|
||||
QuickSaveWriter.Create("Save_Backup")
|
||||
.Write("Backup", backupSave)
|
||||
.Commit();
|
||||
}
|
||||
|
||||
private Save LoadMain()
|
||||
{
|
||||
try
|
||||
{
|
||||
return QuickSaveReader.Create("Save_Main").Read<Save>("Main");
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning("Main 세이브 로드 실패: " + e.Message);
|
||||
|
||||
// 백업 시도
|
||||
if (QuickSaveRaw.Exists(BackupSaveFilePath))
|
||||
{
|
||||
Debug.LogWarning("백업 세이브로 복구 시도");
|
||||
return LoadBackup();
|
||||
}
|
||||
|
||||
// 백업도 없을 경우 새 세이브 생성
|
||||
Debug.LogError("세이브 전체 손상 → 새 세이브 생성");
|
||||
return CreateNewSave();
|
||||
}
|
||||
}
|
||||
|
||||
private Save LoadBackup()
|
||||
{
|
||||
try
|
||||
{
|
||||
return QuickSaveReader.Create("Save_Backup").Read<Save>("Backup");
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning("Backup 세이브 로드 실패: " + e.Message);
|
||||
|
||||
// 백업 시도
|
||||
if (QuickSaveRaw.Exists(MainSaveFilePath))
|
||||
{
|
||||
Debug.LogWarning("메인 세이브로 복구 시도");
|
||||
return LoadMain();
|
||||
}
|
||||
|
||||
// 메인도 없을 경우 새 세이브 생성
|
||||
Debug.LogError("세이브 전체 손상 → 새 세이브 생성");
|
||||
return CreateNewSave();
|
||||
}
|
||||
}
|
||||
|
||||
//더미 세이브 파일 생성
|
||||
private Save CreateNewSave()
|
||||
{
|
||||
var fresh = StatManager.instance.ToSaveData();
|
||||
SaveMain();
|
||||
SaveBackup();
|
||||
return fresh;
|
||||
}
|
||||
|
||||
//세이브 파일의 존재 여부 확인
|
||||
private void EnsureSaveExists()
|
||||
{
|
||||
if (!QuickSaveRaw.Exists(MainSaveFilePath)) // Save_Main 파일이 없을때
|
||||
{
|
||||
if (!QuickSaveRaw.Exists(BackupSaveFilePath)) //Save_Backup 파일도 존재하지 않을때
|
||||
{
|
||||
UpdateSaveInfo();
|
||||
SaveMain(); //Save_Main 파일 생성
|
||||
backupSave = LoadMain();
|
||||
SaveBackup(); //Save_Backup 파일 생성
|
||||
|
||||
Debug.Log("세이브가 존재하지 않아 새로운 세이브를 생성했습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
mainSave = LoadBackup(); //백업을 메인으로 로드.
|
||||
SaveMain();
|
||||
Debug.Log("메인을 백업 세이브로 로드했습니다.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!QuickSaveRaw.Exists(BackupSaveFilePath)) //Save_Backup 파일이 없을떄
|
||||
{
|
||||
backupSave = LoadMain();
|
||||
SaveBackup();
|
||||
Debug.Log("백업을 메인 세이브로 로드했습니다.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//세이브 파일 디렉토리 확인
|
||||
private string GetSavePath(string fileNameWithoutExt)
|
||||
{
|
||||
string directory = Path.Combine(Application.persistentDataPath, SaveFolder);
|
||||
|
||||
// 폴더가 없다면 생성
|
||||
if (!Directory.Exists(directory))
|
||||
Directory.CreateDirectory(directory);
|
||||
|
||||
return Path.Combine(directory, fileNameWithoutExt + ".json");
|
||||
}
|
||||
|
||||
// 씬이 바뀔 때 마다 자동저장
|
||||
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
StartCoroutine(SaveAfterOneFrame());
|
||||
}
|
||||
|
||||
//Start함수 이후에 호출되도록 1프레임 지연
|
||||
IEnumerator SaveAfterOneFrame()
|
||||
{
|
||||
yield return null;
|
||||
Save();
|
||||
Debug.Log("자동저장 되었습니다.");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb5079b7064e2324890f78e18dfe7a6e
|
||||
guid: 9c85bf88c19d95947bc288da9dfd85bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
120
Assets/KJM/KJM_Test/StatManager.cs
Normal file
120
Assets/KJM/KJM_Test/StatManager.cs
Normal file
@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
/// <summary>
|
||||
/// 테스트용 임시 클래스
|
||||
/// </summary>
|
||||
public class StatManager : MonoBehaviour
|
||||
{
|
||||
public static StatManager instance;
|
||||
|
||||
public int attackLevel;
|
||||
public int attackSpeedLevel;
|
||||
public int heartLevel;
|
||||
public int moveSpeedLevel;
|
||||
public int evasionTimeLevel;
|
||||
public int stageLevel;
|
||||
|
||||
public float time;
|
||||
public int day;
|
||||
public float health;
|
||||
public float reputation;
|
||||
|
||||
public bool isEvent; //Todo 이벤트 여부 및 관련 조건들 추가
|
||||
public int mealCount;
|
||||
public int houseworkCount;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 스탯값 변화
|
||||
/// </summary>
|
||||
public void ChangeValue()
|
||||
{
|
||||
float floatValue = Random.Range(0f, 2f);
|
||||
Debug.Log(floatValue);
|
||||
int intValue = Random.Range(0, 10);
|
||||
Debug.Log(intValue);
|
||||
|
||||
attackLevel = intValue;
|
||||
attackSpeedLevel = intValue;
|
||||
heartLevel = intValue;
|
||||
moveSpeedLevel = intValue;
|
||||
evasionTimeLevel = intValue;
|
||||
stageLevel = intValue;
|
||||
|
||||
|
||||
time = floatValue;
|
||||
day = intValue;
|
||||
health = floatValue;
|
||||
reputation = floatValue;
|
||||
|
||||
isEvent = false;
|
||||
mealCount = intValue;
|
||||
houseworkCount = intValue;
|
||||
|
||||
Debug.Log("ChangeValue");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 스탯값 반환
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Save ToSaveData()
|
||||
{
|
||||
return new Save
|
||||
{
|
||||
dungeonSave = new DungeonSave
|
||||
{
|
||||
attackLevel = this.attackLevel,
|
||||
attackSpeedLevel = this.attackSpeedLevel,
|
||||
heartLevel = this.heartLevel,
|
||||
moveSpeedLevel = this.moveSpeedLevel,
|
||||
evasionTimeLevel = this.evasionTimeLevel,
|
||||
stageLevel = this.stageLevel
|
||||
},
|
||||
homeSave = new HomeSave
|
||||
{
|
||||
time = this.time,
|
||||
day = this.day,
|
||||
health = this.health,
|
||||
reputation = this.reputation,
|
||||
isEvent = false,
|
||||
mealCount = this.mealCount,
|
||||
houseworkCount = this.houseworkCount,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void loadSaveData2StataManager(Save saveData)
|
||||
{
|
||||
attackLevel = saveData.dungeonSave.attackLevel;
|
||||
attackSpeedLevel = saveData.dungeonSave.attackSpeedLevel;
|
||||
heartLevel = saveData.dungeonSave.heartLevel;
|
||||
moveSpeedLevel = saveData.dungeonSave.moveSpeedLevel;
|
||||
evasionTimeLevel = saveData.dungeonSave.evasionTimeLevel;
|
||||
stageLevel = saveData.dungeonSave.stageLevel;
|
||||
|
||||
time = saveData.homeSave.time;
|
||||
day = saveData.homeSave.day;
|
||||
health = saveData.homeSave.health;
|
||||
reputation = saveData.homeSave.reputation;
|
||||
isEvent = saveData.homeSave.isEvent;
|
||||
mealCount = saveData.homeSave.mealCount;
|
||||
houseworkCount = saveData.homeSave.houseworkCount;
|
||||
}
|
||||
|
||||
public void SceneChange()
|
||||
{
|
||||
SceneManager.LoadScene("Main");
|
||||
}
|
||||
}
|
11
Assets/KJM/KJM_Test/StatManager.cs.meta
Normal file
11
Assets/KJM/KJM_Test/StatManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afa35303e7c5e6141b05a11a7b5233ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -6,6 +6,20 @@ using Random = UnityEngine.Random;
|
||||
|
||||
public class PlayerStats : MonoBehaviour
|
||||
{
|
||||
public class StatsChangeData // 변경된 스탯 데이터
|
||||
{
|
||||
public float Time { get; }
|
||||
public float Health { get; }
|
||||
public float Reputation { get; }
|
||||
|
||||
public StatsChangeData(float time, float health, float reputation)
|
||||
{
|
||||
Time = time;
|
||||
Health = health;
|
||||
Reputation = reputation;
|
||||
}
|
||||
}
|
||||
|
||||
private GameConstants _gameConstants;
|
||||
private ValueByAction _valueByAction;
|
||||
|
||||
@ -17,6 +31,8 @@ public class PlayerStats : MonoBehaviour
|
||||
public event Action Exhaustion; // 탈진
|
||||
public event Action Overslept; // 결근(늦잠)
|
||||
public event Action ZeroReputation; // 평판 0 이벤트
|
||||
public event Action<StatsChangeData> OnStatsChanged; // 스탯 변경 이벤트
|
||||
public event Action OnWorked; // 퇴근 이벤트 (출근 이후 집에 돌아올 시간에 발생)
|
||||
|
||||
private float previousAddHealth = 0f;
|
||||
|
||||
@ -36,14 +52,7 @@ public class PlayerStats : MonoBehaviour
|
||||
{
|
||||
ActionEffect effect = _valueByAction.GetActionEffect(actionType);
|
||||
|
||||
if (HealthStat >= effect.healthChange)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return (HealthStat >= (effect.healthChange * -1));
|
||||
}
|
||||
|
||||
// 행동 처리 메서드
|
||||
@ -56,6 +65,15 @@ public class PlayerStats : MonoBehaviour
|
||||
ModifyTime(effect.timeChange, actionType);
|
||||
ModifyHealth(effect.healthChange);
|
||||
ModifyReputation(effect.reputationChange);
|
||||
|
||||
// 스탯 변경 이벤트 (UI 업데이트용)
|
||||
OnStatsChanged?.Invoke(new StatsChangeData(TimeStat, HealthStat, ReputationStat));
|
||||
|
||||
// 스탯 - 시간이 변경된 이후 퇴근 이벤트 발생
|
||||
if (actionType == ActionType.Work)
|
||||
{
|
||||
OnWorked?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
// 출근 가능 여부 확인 메서드
|
||||
|
@ -1,103 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerStatsTest : MonoBehaviour
|
||||
{
|
||||
[Header("현재 스탯")]
|
||||
[SerializeField, ReadOnly] private float currentTime;
|
||||
[SerializeField, ReadOnly] private float currentHealth;
|
||||
[SerializeField, ReadOnly] private float currentReputation;
|
||||
[SerializeField, ReadOnly] private int currentDay;
|
||||
|
||||
[Header("테스트 액션")]
|
||||
[Tooltip("액션을 선택하고 체크박스를 체크하여 실행")]
|
||||
[SerializeField] private ActionType actionToTest;
|
||||
[SerializeField] private bool executeAction;
|
||||
|
||||
// 컴포넌트 참조
|
||||
[Header("필수 참조")]
|
||||
[SerializeField] private PlayerStats playerStats;
|
||||
[SerializeField] private GameManager gameManager;
|
||||
|
||||
// ReadOnly 속성 (인스펙터에서 수정 불가능하게 만듦)
|
||||
public class ReadOnlyAttribute : PropertyAttribute { }
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 참조 찾기 (없을 경우)
|
||||
if (playerStats == null)
|
||||
{
|
||||
playerStats = FindObjectOfType<PlayerStats>();
|
||||
Debug.Log("PlayerStats를 찾아 참조했습니다.");
|
||||
}
|
||||
|
||||
if (gameManager == null)
|
||||
{
|
||||
gameManager = FindObjectOfType<GameManager>();
|
||||
Debug.Log("GameManager를 찾아 참조했습니다.");
|
||||
}
|
||||
|
||||
// 초기 스탯 표시 업데이트
|
||||
UpdateStatsDisplay();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
// 매 프레임마다 스탯 업데이트
|
||||
UpdateStatsDisplay();
|
||||
|
||||
// 체크박스가 체크되면 선택된 액션 실행
|
||||
if (executeAction)
|
||||
{
|
||||
ExecuteSelectedAction();
|
||||
executeAction = false; // 체크박스 초기화
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateStatsDisplay()
|
||||
{
|
||||
// 참조 확인 후 스탯 업데이트
|
||||
if (playerStats != null)
|
||||
{
|
||||
currentTime = playerStats.TimeStat;
|
||||
currentHealth = playerStats.HealthStat;
|
||||
currentReputation = playerStats.ReputationStat;
|
||||
|
||||
// GameManager에서 날짜 정보 가져오기
|
||||
if (gameManager != null)
|
||||
{
|
||||
currentDay = gameManager.CurrentDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("GameManager 참조가 없습니다.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("PlayerStats 참조가 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteSelectedAction()
|
||||
{
|
||||
if (playerStats != null)
|
||||
{
|
||||
// 선택한 액션 실행
|
||||
playerStats.PerformAction(actionToTest);
|
||||
UpdateStatsDisplay();
|
||||
Debug.Log($"액션 실행: {actionToTest}");
|
||||
|
||||
// 콘솔에 현재 스탯 정보 출력
|
||||
Debug.Log($"현재 스탯 - 시간: {currentTime}, 체력: {currentHealth}, 평판: {currentReputation}, 날짜: {currentDay}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("PlayerStats 참조가 없어 액션을 실행할 수 없습니다.");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a65e9dd60a7532ae1c4c43fda477ac0940c18c5c60f8a164b6fd52b9f1f4a42
|
||||
size 5196
|
8
Assets/LIN.meta
Normal file
8
Assets/LIN.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f8deeb0bf097f645aaa23fd62feca52
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/LIN/DailyRoutine.meta
Normal file
8
Assets/LIN/DailyRoutine.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f483f83ac9776d34c9bbbc1b84f32c27
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
100
Assets/LIN/DailyRoutine/InteractionController.cs
Normal file
100
Assets/LIN/DailyRoutine/InteractionController.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class InteractionController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] PlayerStats playerStats;
|
||||
[SerializeField] LayerMask interactionLayerMask;
|
||||
[FormerlySerializedAs("housingCanvasManager")]
|
||||
[Header("UI 연동")]
|
||||
[SerializeField] HousingCanvasController housingCanvasController;
|
||||
|
||||
// 상호작용 가능한 사물 범위에 들어올 때
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
||||
{
|
||||
ActionType interactionType = other.gameObject.GetComponent<InteractionProp>().RoutineEnter();
|
||||
if( interactionType != null )
|
||||
{
|
||||
PopActionOnScreen(interactionType);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 사물에서 벗어날 때 UI 정리
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
||||
{
|
||||
housingCanvasController.HideInteractionButton();
|
||||
}
|
||||
}
|
||||
|
||||
// ActionType 별로 화면에 상호작용 내용 표시, 상호작용 버튼에 이벤트 작성
|
||||
private void PopActionOnScreen(ActionType interactionType)
|
||||
{
|
||||
switch (interactionType)
|
||||
{
|
||||
case ActionType.Sleep:
|
||||
housingCanvasController.ShowInteractionButton("침대에서 잘까?","숙면으로 시간 당 체력 1을 회복한다.", () =>
|
||||
{
|
||||
playerStats.PerformAction(ActionType.Sleep);
|
||||
housingCanvasController.HideInteractionButton();
|
||||
//TODO: 화면 전환 효과와 UI 업데이트 작업
|
||||
});
|
||||
break;
|
||||
case ActionType.Housework:
|
||||
housingCanvasController.ShowInteractionButton("밀린 집안일을 처리할까?","체력 1을 사용하고 좋은일이 일어날지도 모른다", () =>
|
||||
{
|
||||
if (playerStats.CanPerformByHealth(ActionType.Housework))
|
||||
{
|
||||
playerStats.PerformAction(ActionType.Housework);
|
||||
housingCanvasController.HideInteractionButton();
|
||||
//TODO: 집안일 후 랜덤 강화 효과 적용
|
||||
}
|
||||
else
|
||||
{
|
||||
housingCanvasController.SetActionText("힘들어서 못해..");
|
||||
housingCanvasController.SetDescriptionText();
|
||||
}
|
||||
});
|
||||
break;
|
||||
case ActionType.Dungeon:
|
||||
housingCanvasController.ShowInteractionButton("던전에 입장할까?","체력 3을 사용하고 3시간이 흐른다.", () =>
|
||||
{
|
||||
if (playerStats.CanPerformByHealth(ActionType.Dungeon))
|
||||
{
|
||||
playerStats.PerformAction(ActionType.Dungeon);
|
||||
housingCanvasController.HideInteractionButton();
|
||||
}
|
||||
else
|
||||
{
|
||||
housingCanvasController.SetActionText("던전에 갈 체력이 되지 않아..");
|
||||
housingCanvasController.SetDescriptionText();
|
||||
}
|
||||
});
|
||||
break;
|
||||
case ActionType.Work:
|
||||
housingCanvasController.ShowInteractionButton("출근한다.","체력 3을 사용하고 저녁 6시에나 돌아오겠지..", () =>
|
||||
{
|
||||
if (playerStats.CanPerformByHealth(ActionType.Work))
|
||||
{
|
||||
playerStats.PerformAction(ActionType.Work);
|
||||
housingCanvasController.HideInteractionButton();
|
||||
}
|
||||
else
|
||||
{
|
||||
housingCanvasController.SetActionText("도저히 출근할 체력이 안되는걸..?");
|
||||
housingCanvasController.SetDescriptionText();
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/LIN/DailyRoutine/InteractionController.cs.meta
Normal file
11
Assets/LIN/DailyRoutine/InteractionController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4ff6298b8d45e44493da75e053196c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/LIN/DailyRoutine/InteractionProp.cs
Normal file
8
Assets/LIN/DailyRoutine/InteractionProp.cs
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class InteractionProp: MonoBehaviour
|
||||
{
|
||||
public abstract ActionType RoutineEnter();
|
||||
}
|
3
Assets/LIN/DailyRoutine/InteractionProp.cs.meta
Normal file
3
Assets/LIN/DailyRoutine/InteractionProp.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb3b1f8a97cd4befaf14a41276d31292
|
||||
timeCreated: 1744822822
|
10
Assets/LIN/DailyRoutine/InteractionPropBed.cs
Normal file
10
Assets/LIN/DailyRoutine/InteractionPropBed.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InteractionPropBed : InteractionProp
|
||||
{ public override ActionType RoutineEnter()
|
||||
{
|
||||
return ActionType.Sleep;
|
||||
}
|
||||
}
|
11
Assets/LIN/DailyRoutine/InteractionPropBed.cs.meta
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropBed.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61f97dc6faa89de409ce2414a02c4f40
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/LIN/DailyRoutine/InteractionPropFridge.cs
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropFridge.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InteractionPropFridge : InteractionProp
|
||||
{
|
||||
public override ActionType RoutineEnter()
|
||||
{
|
||||
return ActionType.Dungeon;
|
||||
}
|
||||
}
|
11
Assets/LIN/DailyRoutine/InteractionPropFridge.cs.meta
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropFridge.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c8e3fe029f4fca43a82d71cd49837ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/LIN/DailyRoutine/InteractionPropSink.cs
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropSink.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InteractionPropSink : InteractionProp
|
||||
{
|
||||
public override ActionType RoutineEnter()
|
||||
{
|
||||
return ActionType.Housework;
|
||||
}
|
||||
}
|
11
Assets/LIN/DailyRoutine/InteractionPropSink.cs.meta
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropSink.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61d920882ed2121428f4e61450f51ef1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/LIN/DailyRoutine/InteractionPropWork.cs
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropWork.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InteractionPropWork : InteractionProp
|
||||
{
|
||||
public override ActionType RoutineEnter()
|
||||
{
|
||||
return ActionType.Work;
|
||||
}
|
||||
}
|
11
Assets/LIN/DailyRoutine/InteractionPropWork.cs.meta
Normal file
11
Assets/LIN/DailyRoutine/InteractionPropWork.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec766ebb2f69cb441af73a71172156f9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LIN/Housing Copy.unity
(Stored with Git LFS)
Normal file
BIN
Assets/LIN/Housing Copy.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/LIN/Housing Copy.unity.meta
Normal file
7
Assets/LIN/Housing Copy.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86c6ebc5f9b48c345bd9d6f402bdc848
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
66
Assets/LIN/HousingCanvasController.cs
Normal file
66
Assets/LIN/HousingCanvasController.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class HousingCanvasController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject interactionButton;
|
||||
[SerializeField] TMP_Text actionText;
|
||||
[SerializeField] TMP_Text descriptionText;
|
||||
|
||||
public Action OnInteractionButtonPressed;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
InitTexts();
|
||||
interactionButton.SetActive(false);
|
||||
}
|
||||
|
||||
//사물 이름 세팅
|
||||
public void SetActionText(string text = "")
|
||||
{
|
||||
actionText.text = text;
|
||||
}
|
||||
//사물 상호작용 내용 설명
|
||||
public void SetDescriptionText(string text = "")
|
||||
{
|
||||
descriptionText.text = text;
|
||||
}
|
||||
|
||||
private void InitTexts()
|
||||
{
|
||||
SetActionText();
|
||||
SetDescriptionText();
|
||||
}
|
||||
|
||||
// 상호작용 가능한 사물에 가까이 갔을 때 화면에 텍스트, 버튼 표시
|
||||
public void ShowInteractionButton(string actText, string descText,Action onInteractionButtonPressed)
|
||||
{
|
||||
SetActionText(actText);
|
||||
SetDescriptionText(descText);
|
||||
interactionButton.SetActive(true);
|
||||
|
||||
//각 행동 별로 실행되어야 할 이벤트 구독
|
||||
OnInteractionButtonPressed = onInteractionButtonPressed;
|
||||
}
|
||||
|
||||
//범위에서 벗어나면 상호작용 버튼 off
|
||||
public void HideInteractionButton()
|
||||
{
|
||||
SetActionText();
|
||||
SetDescriptionText();
|
||||
interactionButton.SetActive(false);
|
||||
|
||||
//구독해놓은 이벤트 해제
|
||||
OnInteractionButtonPressed = null;
|
||||
}
|
||||
|
||||
//상호작용 버튼 눌렀을 때
|
||||
public void OnClickInteractionButton()
|
||||
{
|
||||
OnInteractionButtonPressed?.Invoke();
|
||||
}
|
||||
}
|
11
Assets/LIN/HousingCanvasController.cs.meta
Normal file
11
Assets/LIN/HousingCanvasController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d899866e8f8b8a045aafba015e947a90
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user