Merge branch 'main' of https://github.com/Degulleo/Degulleo3D into DEG-27-돌발이벤트-시스템
# Conflicts: # Assets/LYM/Fonts/Galmuri9 SDF.asset
This commit is contained in:
commit
a01b01a15a
@ -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
|
BIN
Assets/JAY/Animation/Attack01.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Attack01.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Attack01.anim.meta
Normal file
8
Assets/JAY/Animation/Attack01.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c25471f7e975de140af2a11af5aa791a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JAY/Animation/Attack02.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Attack02.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Attack02.anim.meta
Normal file
8
Assets/JAY/Animation/Attack02.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c17f0c4e3017bb448ff5120b9f61794
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JAY/Animation/Attack03.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Attack03.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Attack03.anim.meta
Normal file
8
Assets/JAY/Animation/Attack03.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23ef3f3f7e8603c43b49b5a12de765cf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JAY/Animation/Attack04.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Attack04.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Attack04.anim.meta
Normal file
8
Assets/JAY/Animation/Attack04.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee0fb1c70ff918147854e2fa7f8ce65d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
109
Assets/JAY/Animation/UpperBodyOnly.mask
Normal file
109
Assets/JAY/Animation/UpperBodyOnly.mask
Normal file
@ -0,0 +1,109 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!319 &31900000
|
||||
AvatarMask:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UpperBodyOnly
|
||||
m_Mask: 00000000010000000100000000000000000000000100000001000000010000000100000000000000000000000100000001000000
|
||||
m_Elements:
|
||||
- m_Path:
|
||||
m_Weight: 1
|
||||
- m_Path: Body05
|
||||
m_Weight: 1
|
||||
- m_Path: Eye01
|
||||
m_Weight: 1
|
||||
- m_Path: Hair01
|
||||
m_Weight: 1
|
||||
- m_Path: Head01_Male
|
||||
m_Weight: 1
|
||||
- m_Path: Mouth01
|
||||
m_Weight: 1
|
||||
- m_Path: root
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/BackpackBone
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/shoulderPadJoint_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l/index_02_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l/index_02_l/index_03_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l/thumb_02_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l/thumb_02_l/thumb_03_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/weapon_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/shoulderPadJoint_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r/index_02_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r/index_02_r/index_03_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r/thumb_02_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r/thumb_02_r/thumb_03_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/weapon_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01/CloakBone02
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01/CloakBone02/CloakBone03
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/neck_01
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/spine_01/spine_02/spine_03/neck_01/head
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_l/calf_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_l/calf_l/foot_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_l/calf_l/foot_l/ball_l
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_r/calf_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_r/calf_r/foot_r
|
||||
m_Weight: 1
|
||||
- m_Path: root/pelvis/thigh_r/calf_r/foot_r/ball_r
|
||||
m_Weight: 1
|
8
Assets/JAY/Animation/UpperBodyOnly.mask.meta
Normal file
8
Assets/JAY/Animation/UpperBodyOnly.mask.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a5307288916a174ab64fb7c68209bac
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 31900000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/JAY/Animator/PlayerController.controller
(Stored with Git LFS)
BIN
Assets/JAY/Animator/PlayerController.controller
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JAY/Prefabs/Equipments/Chopstick.prefab
(Stored with Git LFS)
BIN
Assets/JAY/Prefabs/Equipments/Chopstick.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JAY/Prefabs/WoodChopstick.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Prefabs/WoodChopstick.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdfd96e94fec4014989e36f19373adb2
|
||||
guid: 31f394375ca23d74e82ded5b2efca2b6
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
BIN
Assets/JAY/Prefabs/woodChopstick.fbx
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Prefabs/woodChopstick.fbx
(Stored with Git LFS)
Normal file
Binary file not shown.
109
Assets/JAY/Prefabs/woodChopstick.fbx.meta
Normal file
109
Assets/JAY/Prefabs/woodChopstick.fbx.meta
Normal file
@ -0,0 +1,109 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72a88a4cb2c991b48a9c7ebd8f1a5065
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/JAY/Scripts/IPlayerAction.meta
Normal file
3
Assets/JAY/Scripts/IPlayerAction.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d821074393d4e97aa21ac0fb2cb40d9
|
||||
timeCreated: 1745375836
|
6
Assets/JAY/Scripts/IPlayerAction/IPlayerAction.cs
Normal file
6
Assets/JAY/Scripts/IPlayerAction/IPlayerAction.cs
Normal file
@ -0,0 +1,6 @@
|
||||
public interface IPlayerAction {
|
||||
void StartAction(PlayerController player);
|
||||
void UpdateAction();
|
||||
void EndAction();
|
||||
bool IsActive { get; }
|
||||
}
|
3
Assets/JAY/Scripts/IPlayerAction/IPlayerAction.cs.meta
Normal file
3
Assets/JAY/Scripts/IPlayerAction/IPlayerAction.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d66c33c9a4ef493f9522d78f41b3778f
|
||||
timeCreated: 1745375851
|
58
Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs
Normal file
58
Assets/JAY/Scripts/IPlayerAction/PlayerActionAttack.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerActionAttack : IPlayerAction {
|
||||
private PlayerController player;
|
||||
private int comboStep = 1;
|
||||
private bool comboQueued = false;
|
||||
private bool canReceiveCombo = false;
|
||||
|
||||
public bool IsActive { get; private set; }
|
||||
|
||||
public void StartAction(PlayerController player) {
|
||||
this.player = player;
|
||||
IsActive = true;
|
||||
comboStep = 1;
|
||||
comboQueued = false;
|
||||
PlayComboAnimation(comboStep);
|
||||
player.PlayerAnimator.SetBool("Attack", true);
|
||||
}
|
||||
|
||||
public void UpdateAction() {
|
||||
if (Input.GetKeyDown(KeyCode.X) && canReceiveCombo) {
|
||||
comboQueued = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void EndAction() {
|
||||
player.PlayerAnimator.SetBool("Attack", false);
|
||||
IsActive = false;
|
||||
player = null;
|
||||
}
|
||||
|
||||
public void EnableCombo() {
|
||||
canReceiveCombo = true;
|
||||
}
|
||||
|
||||
public void DisableCombo() {
|
||||
canReceiveCombo = false;
|
||||
|
||||
if (comboQueued && comboStep < 4) {
|
||||
comboStep++;
|
||||
PlayComboAnimation(comboStep);
|
||||
comboQueued = false;
|
||||
} else {
|
||||
EndAction(); // 행동 종료
|
||||
}
|
||||
}
|
||||
|
||||
private void PlayComboAnimation(int step) {
|
||||
player.PlayerAnimator.SetInteger("ComboStep", step);
|
||||
|
||||
// 무기에 콤보 단계 전달
|
||||
var weapon = player.GetComponentInChildren<WeaponController>();
|
||||
if (weapon != null)
|
||||
{
|
||||
weapon.SetComboStep(step);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0513c92d4bea436fb9be539a2f3ad0e3
|
||||
timeCreated: 1745375880
|
@ -1,29 +1,32 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public enum PlayerState { None, Idle, Move, Attack, Hit, Dead }
|
||||
public enum PlayerState { None, Idle, Move, Hit, Dead }
|
||||
|
||||
public class PlayerController : CharacterBase
|
||||
public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
{
|
||||
// 외부 접근 가능 변수
|
||||
[Header("Movement")]
|
||||
[SerializeField] private float rotationSpeed = 10f;
|
||||
|
||||
[Header("Attach Points")]
|
||||
[SerializeField] private Transform rightHandTransform;
|
||||
[SerializeField] private Transform headTransform;
|
||||
|
||||
|
||||
// 내부에서만 사용하는 변수
|
||||
private CharacterController _characterController;
|
||||
private bool _isBattle;
|
||||
private GameObject weapon;
|
||||
private WeaponController _weaponController;
|
||||
|
||||
private IPlayerState CurrentStateClass { get; set; }
|
||||
private IPlayerAction currentAction;
|
||||
|
||||
// 상태 관련
|
||||
private PlayerStateIdle _playerStateIdle;
|
||||
private PlayerStateMove _playerStateMove;
|
||||
|
||||
// 행동 관련
|
||||
private PlayerActionAttack attackAction;
|
||||
|
||||
// 외부에서도 사용하는 변수
|
||||
public FixedJoystick joystick { get; private set; }
|
||||
public PlayerState CurrentState { get; private set; }
|
||||
@ -40,9 +43,11 @@ public class PlayerController : CharacterBase
|
||||
joystick = FindObjectOfType<FixedJoystick>();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
// 상태 초기화
|
||||
_playerStateIdle = new PlayerStateIdle();
|
||||
_playerStateMove = new PlayerStateMove();
|
||||
@ -52,7 +57,9 @@ public class PlayerController : CharacterBase
|
||||
{ PlayerState.Idle, _playerStateIdle },
|
||||
{ PlayerState.Move, _playerStateMove },
|
||||
};
|
||||
|
||||
|
||||
attackAction = new PlayerActionAttack();
|
||||
|
||||
PlayerInit();
|
||||
}
|
||||
|
||||
@ -62,6 +69,21 @@ public class PlayerController : CharacterBase
|
||||
{
|
||||
_playerStates[CurrentState].Update();
|
||||
}
|
||||
|
||||
// 현재 액션이 활성화 되어 있으면 Update 호출
|
||||
if (currentAction != null && currentAction.IsActive) {
|
||||
currentAction.UpdateAction();
|
||||
}
|
||||
|
||||
// 공격 입력 처리
|
||||
if (Input.GetKeyDown(KeyCode.X) && (currentAction == null || !currentAction.IsActive)) {
|
||||
StartAttackAction();
|
||||
}
|
||||
}
|
||||
|
||||
public void StartAttackAction() {
|
||||
currentAction = attackAction;
|
||||
currentAction.StartAction(this);
|
||||
}
|
||||
|
||||
#region 초기화 관련
|
||||
@ -71,7 +93,6 @@ public class PlayerController : CharacterBase
|
||||
SetState(PlayerState.Idle);
|
||||
|
||||
InstantiateWeapon();
|
||||
weapon.SetActive(_isBattle);
|
||||
}
|
||||
|
||||
private void InstantiateWeapon()
|
||||
@ -80,11 +101,12 @@ public class PlayerController : CharacterBase
|
||||
{
|
||||
GameObject weaponObject = Resources.Load<GameObject>("Player/Weapon/Chopstick");
|
||||
weapon = Instantiate(weaponObject, rightHandTransform);
|
||||
// .GetComponent<WeaponController>();
|
||||
_weaponController = weapon?.GetComponent<WeaponController>();
|
||||
_weaponController?.Subscribe(this);
|
||||
weapon?.SetActive(_isBattle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public void SetState(PlayerState state)
|
||||
@ -94,12 +116,49 @@ public class PlayerController : CharacterBase
|
||||
_playerStates[CurrentState].Exit();
|
||||
}
|
||||
CurrentState = state;
|
||||
_playerStates[CurrentState].Enter(this);
|
||||
CurrentStateClass = _playerStates[state];
|
||||
CurrentStateClass.Enter(this);
|
||||
}
|
||||
|
||||
|
||||
public void SwitchBattleMode()
|
||||
{
|
||||
_isBattle = !_isBattle;
|
||||
weapon.SetActive(_isBattle);
|
||||
}
|
||||
|
||||
// Animation Event에서 호출될 메서드
|
||||
public void SetAttackComboTrue() {
|
||||
if (_weaponController.IsAttacking) return; // 이미 공격 중이면 실행 안함
|
||||
|
||||
if (currentAction == attackAction) {
|
||||
attackAction.EnableCombo();
|
||||
_weaponController.AttackStart();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAttackComboFalse() {
|
||||
if (currentAction == attackAction) {
|
||||
attackAction.DisableCombo();
|
||||
_weaponController.AttackEnd();
|
||||
}
|
||||
}
|
||||
|
||||
#region IObserver 관련
|
||||
|
||||
public void OnNext(GameObject value)
|
||||
{
|
||||
Debug.Log("무기 타격");
|
||||
float playerAttackPower = _weaponController.AttackPower * attackPower; // 플레이어 공격 데미지(막타는 일반 데미지의 4배)
|
||||
}
|
||||
|
||||
public void OnError(Exception error)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnCompleted()
|
||||
{
|
||||
_weaponController.Unsubscribe(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -21,8 +21,7 @@ public class PlayerControllerEditor : Editor
|
||||
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
EditorGUILayout.LabelField("현재 상태", playerController.CurrentState.ToString(),
|
||||
EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField("현재 상태", playerController.CurrentState.ToString(), EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
|
||||
@ -39,8 +38,6 @@ public class PlayerControllerEditor : Editor
|
||||
|
||||
if (GUILayout.Button("BattleMode"))
|
||||
playerController.SwitchBattleMode();
|
||||
// if (GUILayout.Button("Attack"))
|
||||
// playerController.SetState(PlayerState.Attack);
|
||||
// if (GUILayout.Button("Hit"))
|
||||
// playerController.SetState(PlayerState.Hit);
|
||||
// if (GUILayout.Button("Dead"))
|
||||
|
@ -7,7 +7,6 @@ public class PlayerStateIdle : IPlayerState
|
||||
public void Enter(PlayerController playerController)
|
||||
{
|
||||
_playerController = playerController;
|
||||
// _playerController.Animator.SetBool("Idle", true);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
@ -19,7 +18,6 @@ public class PlayerStateIdle : IPlayerState
|
||||
if (inputHorizontal != 0 || inputVertical != 0)
|
||||
{
|
||||
_playerController.SetState(PlayerState.Move);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,12 +16,11 @@ public class PlayerStateMove : IPlayerState
|
||||
{
|
||||
float inputHorizontal = _playerController.joystick.Horizontal;
|
||||
float inputVertical = _playerController.joystick.Vertical;
|
||||
|
||||
|
||||
// 이동
|
||||
if (inputHorizontal != 0 || inputVertical != 0)
|
||||
{
|
||||
HandleMovement();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -60,7 +59,5 @@ public class PlayerStateMove : IPlayerState
|
||||
|
||||
Vector3 finalMove = (move + _gravityVelocity) * Time.deltaTime;
|
||||
_playerController.CharacterController.Move(finalMove);
|
||||
|
||||
// _playerController.PlayerAnimator.SetFloat("Move", _playerController.CharacterController.velocity.magnitude);
|
||||
}
|
||||
}
|
||||
|
3
Assets/JAY/Scripts/Weapon.meta
Normal file
3
Assets/JAY/Scripts/Weapon.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8c373d7c1104f62b6ff1848bcc6b3f1
|
||||
timeCreated: 1745283320
|
10
Assets/JAY/Scripts/Weapon/IObservable.cs
Normal file
10
Assets/JAY/Scripts/Weapon/IObservable.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public interface IObservable<T>
|
||||
{
|
||||
public void Subscribe(IObserver<T> observer);
|
||||
public void Unsubscribe(IObserver<T> observer);
|
||||
public void Notify(T value);
|
||||
}
|
3
Assets/JAY/Scripts/Weapon/IObservable.cs.meta
Normal file
3
Assets/JAY/Scripts/Weapon/IObservable.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7db2e89701864527b193c3c5b241ca76
|
||||
timeCreated: 1745283381
|
11
Assets/JAY/Scripts/Weapon/IObserver.cs
Normal file
11
Assets/JAY/Scripts/Weapon/IObserver.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public interface IObserver<T>
|
||||
{
|
||||
public void OnNext(T value);
|
||||
public void OnError(Exception error);
|
||||
public void OnCompleted();
|
||||
}
|
3
Assets/JAY/Scripts/Weapon/IObserver.cs.meta
Normal file
3
Assets/JAY/Scripts/Weapon/IObserver.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 739f14653b804ce4a07632994722e3d6
|
||||
timeCreated: 1745283352
|
186
Assets/JAY/Scripts/WeaponController.cs
Normal file
186
Assets/JAY/Scripts/WeaponController.cs
Normal file
@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class WeaponController : MonoBehaviour, IObservable<GameObject>
|
||||
{
|
||||
[Serializable]
|
||||
public class WeaponTriggerZone
|
||||
{
|
||||
public Vector3 position;
|
||||
public float radius;
|
||||
}
|
||||
|
||||
[SerializeField] private WeaponTriggerZone[] _triggerZones;
|
||||
[SerializeField] private LayerMask targetLayerMask;
|
||||
|
||||
private List<IObserver<GameObject>> _observers = new List<IObserver<GameObject>>();
|
||||
|
||||
// 공격 데미지 처리
|
||||
private int attackPower = 1;
|
||||
private int _comboStep = 1;
|
||||
public int AttackPower // 플레이어 공격 데미지
|
||||
{
|
||||
get
|
||||
{
|
||||
// 마지막 콤보일 경우 공격력 증가
|
||||
return _comboStep == 4 ? attackPower * 4 : attackPower;
|
||||
}
|
||||
}
|
||||
private PlayerController _playerController;
|
||||
private bool _isAttacking = false;
|
||||
public bool IsAttacking => _isAttacking;
|
||||
|
||||
// 충돌 처리
|
||||
private Vector3[] _previousPositions;
|
||||
private HashSet<Collider> _hitColliders;
|
||||
private Ray _ray = new Ray();
|
||||
private RaycastHit[] _hits = new RaycastHit[10];
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (_triggerZones == null || _triggerZones.Length == 0)
|
||||
{
|
||||
Debug.LogWarning("Trigger Zones이 설정되지 않았습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
_playerController = GetComponent<PlayerController>();
|
||||
_previousPositions = new Vector3[_triggerZones.Length];
|
||||
_hitColliders = new HashSet<Collider>();
|
||||
}
|
||||
|
||||
public void AttackStart()
|
||||
{
|
||||
if (_hitColliders == null)
|
||||
{
|
||||
Debug.LogError("_hitColliders가 null입니다. 무기를 들고 있는지 확인해 주세요!");
|
||||
return;
|
||||
}
|
||||
_isAttacking = true;
|
||||
_hitColliders.Clear();
|
||||
|
||||
for (int i = 0; i < _triggerZones.Length; i++)
|
||||
{
|
||||
_previousPositions[i] = transform.position + transform.TransformVector(_triggerZones[i].position);
|
||||
}
|
||||
}
|
||||
|
||||
public void AttackEnd()
|
||||
{
|
||||
_isAttacking = false;
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (_isAttacking)
|
||||
{
|
||||
for (int i = 0; i < _triggerZones.Length; i++)
|
||||
{
|
||||
var worldPosition = transform.position +
|
||||
transform.TransformVector(_triggerZones[i].position);
|
||||
var direction = worldPosition - _previousPositions[i];
|
||||
_ray.origin = _previousPositions[i];
|
||||
_ray.direction = direction;
|
||||
|
||||
if (direction.magnitude < 0.01f) return;
|
||||
|
||||
var hitCount = Physics.SphereCastNonAlloc(_ray,
|
||||
_triggerZones[i].radius, _hits,
|
||||
direction.magnitude, targetLayerMask,
|
||||
QueryTriggerInteraction.UseGlobal);
|
||||
for (int j = 0; j < hitCount; j++)
|
||||
{
|
||||
var hit = _hits[j];
|
||||
if (!_hitColliders.Contains(hit.collider))
|
||||
{
|
||||
_hitColliders.Add(hit.collider);
|
||||
Notify(hit.collider.gameObject);
|
||||
}
|
||||
}
|
||||
_previousPositions[i] = worldPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator ResumeTimeScale()
|
||||
{
|
||||
yield return new WaitForSecondsRealtime(10f);
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
|
||||
public void Subscribe(IObserver<GameObject> observer)
|
||||
{
|
||||
if (!_observers.Contains(observer))
|
||||
{
|
||||
_observers.Add(observer);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unsubscribe(IObserver<GameObject> observer)
|
||||
{
|
||||
_observers.Remove(observer);
|
||||
}
|
||||
|
||||
public void Notify(GameObject value)
|
||||
{
|
||||
foreach (var observer in _observers)
|
||||
{
|
||||
observer.OnNext(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
var copyObservers = new List<IObserver<GameObject>>(_observers);
|
||||
foreach (var observer in copyObservers)
|
||||
{
|
||||
observer.OnCompleted();
|
||||
}
|
||||
_observers.Clear();
|
||||
}
|
||||
|
||||
public void SetComboStep(int step)
|
||||
{
|
||||
_comboStep = step;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
if (_triggerZones == null) return;
|
||||
|
||||
if (_isAttacking && _previousPositions != null)
|
||||
{
|
||||
for (int i = 0; i < _triggerZones.Length; i++)
|
||||
{
|
||||
if (_triggerZones[i] == null) continue;
|
||||
|
||||
var worldPosition = transform.position +
|
||||
transform.TransformVector(_triggerZones[i].position);
|
||||
var direction = worldPosition - _previousPositions[i];
|
||||
|
||||
Gizmos.color = Color.green;
|
||||
Gizmos.DrawWireSphere(worldPosition, _triggerZones[i].radius);
|
||||
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireSphere(worldPosition + direction, _triggerZones[i].radius);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var triggerZone in _triggerZones)
|
||||
{
|
||||
if (triggerZone == null) continue;
|
||||
|
||||
Gizmos.color = Color.green;
|
||||
Gizmos.DrawSphere(triggerZone.position, triggerZone.radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
3
Assets/JAY/Scripts/WeaponController.cs.meta
Normal file
3
Assets/JAY/Scripts/WeaponController.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14a4a5b667c44deaac42b0a5b624aaaf
|
||||
timeCreated: 1745289551
|
@ -1,23 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class JoystickPanelController : MonoBehaviour
|
||||
{
|
||||
public void OnClickAttackButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClickDashButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClickInteractionButton()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c820602050ac1d4b907f11034ef95ad
|
||||
guid: dbfd37452c39a544895c4f842901be82
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
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:
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 533241c82a79dcc46932391bf865ce21
|
||||
guid: cf313a0298660aa4db16ced680557810
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
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:
|
@ -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
|
File diff suppressed because one or more lines are too long
8
Assets/LYM/Materials.meta
Normal file
8
Assets/LYM/Materials.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02303d18bbfec0e4b9f6699f1a0152d2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Materials/Glass.mat
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Materials/Glass.mat
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/LYM/Materials/Glass.mat.meta
Normal file
8
Assets/LYM/Materials/Glass.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecddda1709edab34c820484e3de09bea
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Scenes/HousingUI.unity
(Stored with Git LFS)
BIN
Assets/LYM/Scenes/HousingUI.unity
(Stored with Git LFS)
Binary file not shown.
8
Assets/LYM/Scripts.meta
Normal file
8
Assets/LYM/Scripts.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb031fff0dd38c1499e8108a1b04c699
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
113
Assets/LYM/Scripts/ChatWindowController.cs
Normal file
113
Assets/LYM/Scripts/ChatWindowController.cs
Normal file
@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ChatWindowController : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
[SerializeField] private TMP_Text chatText;
|
||||
[SerializeField] private Image clickIndicator;
|
||||
|
||||
private Coroutine _typingCoroutine;
|
||||
private Coroutine _clickCoroutine;
|
||||
private string _inputText;
|
||||
private Queue<string> _inputQueue;
|
||||
|
||||
public delegate void OnComplete();
|
||||
public OnComplete onComplete;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Init("마무리", () =>
|
||||
{
|
||||
Debug.Log("대화 끝.");
|
||||
});
|
||||
ShowText(_inputQueue.Dequeue());
|
||||
}
|
||||
|
||||
public void Init(string text, OnComplete onComplete)
|
||||
{
|
||||
_inputQueue = new Queue<string>();
|
||||
_inputQueue.Enqueue("아 망했어 오늘도 지각이다!!!! 이러면 진짜 해고당할 수도 있어!!!\n어떡하지 큰일이다!!!");
|
||||
_inputQueue.Enqueue("톼사하셈 ㅋ");
|
||||
_inputQueue.Enqueue("톼사하셈 ㅋ");
|
||||
_inputQueue.Enqueue("스킵도 가능 톼사하셈 ㅋ톼사하셈 ㅋ톼사하셈 ㅋ톼사하셈 ㅋ톼사하셈 ㅋ");
|
||||
_inputQueue.Enqueue(text);
|
||||
this.onComplete = onComplete;
|
||||
}
|
||||
|
||||
//화면에 표시할 텍스트 삽입 함수
|
||||
private void ShowText(string text)
|
||||
{
|
||||
var clickIndicatorColor = clickIndicator.color;
|
||||
clickIndicatorColor.a = 1;
|
||||
clickIndicator.color = clickIndicatorColor;
|
||||
_inputText = text;
|
||||
if (_typingCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_typingCoroutine);
|
||||
}
|
||||
_typingCoroutine = StartCoroutine(TypingEffectCoroutine(_inputText));
|
||||
}
|
||||
|
||||
//텍스트 타이핑효과 코루틴
|
||||
private IEnumerator TypingEffectCoroutine(string text)
|
||||
{
|
||||
StringBuilder strText = new StringBuilder();
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
strText.Append(text[i]);
|
||||
chatText.text = strText.ToString();
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
}
|
||||
|
||||
_clickCoroutine = StartCoroutine(ClickIndicatorCoroutine());
|
||||
_typingCoroutine = null;
|
||||
}
|
||||
|
||||
private IEnumerator ClickIndicatorCoroutine()
|
||||
{
|
||||
bool flag = true;
|
||||
var clickIndicatorColor = clickIndicator.color;
|
||||
while (true)
|
||||
{
|
||||
clickIndicatorColor.a = flag? 0:1;
|
||||
flag = !flag;
|
||||
clickIndicator.color = clickIndicatorColor;
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
//대화창 클릭 시 호출 함수
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (_typingCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_typingCoroutine);
|
||||
_typingCoroutine = null;
|
||||
chatText.text = _inputText;
|
||||
_clickCoroutine = StartCoroutine(ClickIndicatorCoroutine());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_clickCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_clickCoroutine);
|
||||
_clickCoroutine = null;
|
||||
}
|
||||
if (_inputQueue.Count > 0)
|
||||
{
|
||||
ShowText(_inputQueue.Dequeue());
|
||||
}
|
||||
else
|
||||
{
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
11
Assets/LYM/Scripts/ChatWindowController.cs.meta
Normal file
11
Assets/LYM/Scripts/ChatWindowController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6d08eed775f1044ea141c88554ab445
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
83
Assets/LYM/Scripts/InteractionPanelController.cs
Normal file
83
Assets/LYM/Scripts/InteractionPanelController.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
//로딩 상황
|
||||
public enum LoadingState
|
||||
{
|
||||
Housework,
|
||||
Go2Work,
|
||||
LeaveWork,
|
||||
Meal,
|
||||
Dungeon
|
||||
}
|
||||
//집안일 목록
|
||||
public enum HouseworkState
|
||||
{
|
||||
Laundry,
|
||||
Cleaning,
|
||||
|
||||
}
|
||||
|
||||
public class InteractionPanelController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image doingImage;
|
||||
[SerializeField] private TMP_Text doingText;
|
||||
[SerializeField] private Animator animator;
|
||||
|
||||
private Coroutine _textAnimCoroutine;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Init(LoadingState.Housework);
|
||||
}
|
||||
|
||||
private void Init(LoadingState state)
|
||||
{
|
||||
if (_textAnimCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_textAnimCoroutine);
|
||||
}
|
||||
switch (state)
|
||||
{
|
||||
case LoadingState.Housework:
|
||||
doingText.text = "세탁하는 중";
|
||||
animator.Play("Laundry");
|
||||
break;
|
||||
case LoadingState.Go2Work:
|
||||
doingText.text = "출근하는 중";
|
||||
break;
|
||||
case LoadingState.LeaveWork:
|
||||
doingText.text = "퇴근하는 중";
|
||||
break;
|
||||
case LoadingState.Meal:
|
||||
doingText.text = "식사하는 중";
|
||||
break;
|
||||
case LoadingState.Dungeon:
|
||||
doingText.text = "던전 진입하는 중";
|
||||
break;
|
||||
}
|
||||
_textAnimCoroutine = StartCoroutine(TextAnimation());
|
||||
}
|
||||
|
||||
private IEnumerator TextAnimation()
|
||||
{
|
||||
var tempText = doingText.text;
|
||||
float startTime = Time.time;
|
||||
while (Time.time - startTime < 3)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
doingText.text = tempText + new string('.', i + 1);
|
||||
}
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
}
|
||||
_textAnimCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
11
Assets/LYM/Scripts/InteractionPanelController.cs.meta
Normal file
11
Assets/LYM/Scripts/InteractionPanelController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1cce2eaa9f91c4439ec1749048f2df1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
46
Assets/LYM/Scripts/JoystickPanelController.cs
Normal file
46
Assets/LYM/Scripts/JoystickPanelController.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEditor.SearchService;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class JoystickPanelController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject dungeonUI;
|
||||
[SerializeField] private GameObject housingUI;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
dungeonUI.SetActive(false);
|
||||
housingUI.SetActive(false);
|
||||
//현재 씬 이름 확인해 UI 별 활성화 판단
|
||||
string sceneName = SceneManager.GetActiveScene().name;
|
||||
switch (sceneName)
|
||||
{
|
||||
case "HousingUI":
|
||||
housingUI.SetActive(true);
|
||||
break;
|
||||
case "DungeonUI":
|
||||
dungeonUI.SetActive(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClickAttackButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClickDashButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClickInteractionButton()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
23
Assets/LYM/Scripts/StatsPanelController.cs
Normal file
23
Assets/LYM/Scripts/StatsPanelController.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class StatsPanelController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Slider healthSlider;
|
||||
[SerializeField] private Slider reputationSlider;
|
||||
[SerializeField] private TMP_Text healthText;
|
||||
[SerializeField] private TMP_Text reputationText;
|
||||
[SerializeField] private TMP_Text timeText;
|
||||
[SerializeField] private TMP_Text ampmText;
|
||||
[SerializeField] private TMP_Text numberText;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
healthSlider.interactable = false;
|
||||
reputationSlider.interactable = false;
|
||||
}
|
||||
}
|
11
Assets/LYM/Scripts/StatsPanelController.cs.meta
Normal file
11
Assets/LYM/Scripts/StatsPanelController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20ed70d0d6c60894e9186cf3c49b818b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Sprites/2.5dButton.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/2.5dButton.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/2.5dButton.png.meta
Normal file
114
Assets/LYM/Sprites/2.5dButton.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41c9ad4658536b84bb74af1668e1dd4f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 229, y: 228, z: 228, w: 229}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
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: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Sprites/38x38dot4slice.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/38x38dot4slice.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/38x38dot4slice.png.meta
Normal file
114
Assets/LYM/Sprites/38x38dot4slice.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11fd25addefb2b5488766d5aed986d56
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 19, y: 19, z: 19, w: 19}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
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: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/LYM/Sprites/LanudryMachine.meta
Normal file
8
Assets/LYM/Sprites/LanudryMachine.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8e331d76d1397e47ae67df998b5c284
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Sprites/LanudryMachine/LaundryMachinAni.anim
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/LaundryMachinAni.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45e541b6c0b8f7e49ae010acf07d0034
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Sprites/LanudryMachine/LaundryMachine.controller
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/LaundryMachine.controller
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e779556897b9824baf0e6a47276f61b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/Sprites/LanudryMachine/laundrymachine.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/laundrymachine.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine.png.meta
Normal file
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 721e47ab9d13f904494f5b8fe28aa097
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 8
|
||||
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: 1
|
||||
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
|
||||
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/LYM/Sprites/LanudryMachine/laundrymachine2.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/laundrymachine2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine2.png.meta
Normal file
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine2.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fa68a6a74369bb44bc651a12f61a3b3
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 8
|
||||
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: 1
|
||||
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
|
||||
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/LYM/Sprites/LanudryMachine/laundrymachine3.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/laundrymachine3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine3.png.meta
Normal file
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine3.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a216780723c6a0548a1b0bc1e1f241b0
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 8
|
||||
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: 1
|
||||
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
|
||||
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/LYM/Sprites/LanudryMachine/laundrymachine4.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/LanudryMachine/laundrymachine4.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine4.png.meta
Normal file
114
Assets/LYM/Sprites/LanudryMachine/laundrymachine4.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f12433b80578284a83c53c9e56cc2ef
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 8
|
||||
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: 1
|
||||
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
|
||||
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/LYM/Sprites/Speechbubble.png
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/Sprites/Speechbubble.png
(Stored with Git LFS)
Normal file
Binary file not shown.
114
Assets/LYM/Sprites/Speechbubble.png.meta
Normal file
114
Assets/LYM/Sprites/Speechbubble.png.meta
Normal file
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d124efce3f162e7408695c446f8d5595
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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: 0
|
||||
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: 37, y: 20, z: 7, w: 7}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
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: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/LYM/UIPrefabs/ChatWindowPanel.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/LYM/UIPrefabs/ChatWindowPanel.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90448f678f8c503408de14c38cd7c653
|
||||
guid: 05278c285f7049e49a69778586eb6744
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
BIN
Assets/LYM/UIPrefabs/HousingMainUIPanel.prefab
(Stored with Git LFS)
BIN
Assets/LYM/UIPrefabs/HousingMainUIPanel.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/LYM/UIPrefabs/JoystickPanel.prefab
(Stored with Git LFS)
BIN
Assets/LYM/UIPrefabs/JoystickPanel.prefab
(Stored with Git LFS)
Binary file not shown.
44
Assets/New Sprite Atlas.spriteatlas
Normal file
44
Assets/New Sprite Atlas.spriteatlas
Normal file
@ -0,0 +1,44 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!687078895 &4343727234628468602
|
||||
SpriteAtlas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New Sprite Atlas
|
||||
m_EditorData:
|
||||
serializedVersion: 2
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 1
|
||||
compressionQuality: 50
|
||||
maxTextureSize: 2048
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
readable: 0
|
||||
crunchedCompression: 0
|
||||
sRGB: 1
|
||||
platformSettings: []
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
packables: []
|
||||
bindAsDefault: 1
|
||||
isAtlasV2: 0
|
||||
cachedData: {fileID: 0}
|
||||
packedSpriteRenderDataKeys: []
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_PackedSprites: []
|
||||
m_PackedSpriteNamesToIndex: []
|
||||
m_RenderDataMap: {}
|
||||
m_Tag: New Sprite Atlas
|
||||
m_IsVariant: 0
|
8
Assets/New Sprite Atlas.spriteatlas.meta
Normal file
8
Assets/New Sprite Atlas.spriteatlas.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23a19c2052aab0240a04de1442e84512
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4343727234628468602
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/PIH.meta
Normal file
8
Assets/PIH.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 214766d638d7daf41bb335b483002e18
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
29
Assets/PIH/CameraController.cs
Normal file
29
Assets/PIH/CameraController.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraController : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
public Vector3 offset = new Vector3(0f, 10f, -10f);
|
||||
public float smoothSpeed = 5f;
|
||||
|
||||
public Vector2 minBoundary = new Vector2(-50f, -50f);
|
||||
public Vector2 maxBoundary = new Vector2(50f, 50f);
|
||||
|
||||
void Start()
|
||||
{
|
||||
// X축으로 55도 회전
|
||||
transform.rotation = Quaternion.Euler(55f, 0f, 0f);
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
Vector3 desiredPosition = target.position + offset;
|
||||
desiredPosition.x = Mathf.Clamp(desiredPosition.x, minBoundary.x, maxBoundary.x);
|
||||
desiredPosition.z = Mathf.Clamp(desiredPosition.z, minBoundary.y, maxBoundary.y);
|
||||
|
||||
transform.position = Vector3.Lerp(transform.position, desiredPosition, Time.deltaTime * smoothSpeed);
|
||||
}
|
||||
}
|
11
Assets/PIH/CameraController.cs.meta
Normal file
11
Assets/PIH/CameraController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b45463c9e39f224291703edb69fdbf0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Player/Weapon/Chopstick.prefab
(Stored with Git LFS)
BIN
Assets/Resources/Player/Weapon/Chopstick.prefab
(Stored with Git LFS)
Binary file not shown.
8
Assets/Scripts/Common.meta
Normal file
8
Assets/Scripts/Common.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bf376b79225dd241aa996c1967947a1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : Singleton<GameManager>
|
||||
public partial class GameManager : Singleton<GameManager>
|
||||
{
|
||||
[SerializeField] private PlayerStats playerStats;
|
||||
|
||||
@ -20,6 +20,9 @@ public class GameManager : Singleton<GameManager>
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 오디오 초기화
|
||||
InitializeAudio();
|
||||
|
||||
// PlayerStats의 하루 종료 이벤트 구독
|
||||
if (playerStats == null)
|
||||
{
|
8
Assets/Scripts/Common/GameUtility.meta
Normal file
8
Assets/Scripts/Common/GameUtility.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0dc4cdf0dfb7ed14cb56b18f7ff733f4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
184
Assets/Scripts/Common/GameUtility/GameSound.cs
Normal file
184
Assets/Scripts/Common/GameUtility/GameSound.cs
Normal file
@ -0,0 +1,184 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// 게임 매니저의 오디오 관련 부분 클래스
|
||||
public partial class GameManager : Singleton<GameManager>
|
||||
{
|
||||
// 오디오 클립 참조
|
||||
[Header("오디오 설정")]
|
||||
[SerializeField] private AudioClip housingBGM;
|
||||
[SerializeField] private AudioClip dungeonBGM;
|
||||
[SerializeField] private AudioClip gameOverBGM;
|
||||
[SerializeField] private AudioClip victoryBGM;
|
||||
|
||||
[SerializeField] private AudioClip buttonClickSFX;
|
||||
|
||||
[Header("몬스터 효과음")]
|
||||
[SerializeField] private AudioClip monsterAttackSFX;
|
||||
[SerializeField] private AudioClip monsterDeathSFX;
|
||||
|
||||
// 씬에 따른 배경음 맵핑
|
||||
private Dictionary<string, AudioClip> sceneBGMMap = new Dictionary<string, AudioClip>();
|
||||
|
||||
// 현재 재생 중인 BGM 트랙
|
||||
private string currentBGMTrack = "";
|
||||
|
||||
// 오디오 관련 초기화
|
||||
private void InitializeAudio()
|
||||
{
|
||||
// 씬-BGM 맵핑 초기화
|
||||
sceneBGMMap.Clear();
|
||||
sceneBGMMap.Add("Housing", housingBGM); // 씬 이름, 해당 씬 BGM
|
||||
sceneBGMMap.Add("Game", dungeonBGM);
|
||||
|
||||
// 오디오 클립 등록 (초기화)
|
||||
if (SoundManager.Instance != null)
|
||||
{
|
||||
// BGM 등록
|
||||
if (housingBGM != null) SoundManager.Instance.LoadAudioClip("HousingBGM", housingBGM);
|
||||
if (dungeonBGM != null) SoundManager.Instance.LoadAudioClip("DungeonBGM", dungeonBGM);
|
||||
if (gameOverBGM != null) SoundManager.Instance.LoadAudioClip("GameOverBGM", gameOverBGM);
|
||||
if (victoryBGM != null) SoundManager.Instance.LoadAudioClip("VictoryBGM", victoryBGM);
|
||||
|
||||
// SFX 등록
|
||||
if (buttonClickSFX != null) SoundManager.Instance.LoadAudioClip("ButtonClick", buttonClickSFX);
|
||||
|
||||
// 몬스터 SFX 등록
|
||||
if (monsterAttackSFX != null) SoundManager.Instance.LoadAudioClip("MonsterAttack", monsterAttackSFX);
|
||||
if (monsterDeathSFX != null) SoundManager.Instance.LoadAudioClip("MonsterDeath", monsterDeathSFX);
|
||||
|
||||
// 저장된 볼륨 설정 로드
|
||||
// LoadVolumeSettings();
|
||||
|
||||
// 현재 씬에 맞는 배경음 재생
|
||||
// string currentSceneName = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name;
|
||||
// HandleSceneAudio(currentSceneName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("SoundManager 인스턴스를 찾을 수 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
#region 볼륨 제어
|
||||
|
||||
// BGM 볼륨 설정 (0.0 ~ 1.0)
|
||||
public void SetVolumeBGM(float value)
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
value = Mathf.Clamp01(value); // 혹시 모를 범위 제한
|
||||
SoundManager.Instance.SetBGMVolume(value);
|
||||
|
||||
// 설정 저장
|
||||
// PlayerPrefs.SetFloat("BGMVolume", value);
|
||||
// PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
// SFX 볼륨 설정 (0.0 ~ 1.0)
|
||||
public void SetVolumeSFX(float value)
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
value = Mathf.Clamp01(value);
|
||||
SoundManager.Instance.SetSFXVolume(value);
|
||||
|
||||
// 설정 저장
|
||||
// PlayerPrefs.SetFloat("SFXVolume", value);
|
||||
// PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
// PlayerPrefs에 저장된 볼륨 설정 불러오기
|
||||
// private void LoadVolumeSettings()
|
||||
// {
|
||||
// float bgmVolume = PlayerPrefs.GetFloat("BGMVolume", 1.0f);
|
||||
// float sfxVolume = PlayerPrefs.GetFloat("SFXVolume", 1.0f);
|
||||
//
|
||||
// // 저장된 볼륨 설정 적용
|
||||
// if (SoundManager.Instance != null)
|
||||
// {
|
||||
// SoundManager.Instance.SetBGMVolume(bgmVolume);
|
||||
// SoundManager.Instance.SetSFXVolume(sfxVolume);
|
||||
// }
|
||||
// }
|
||||
|
||||
#endregion
|
||||
|
||||
// 씬에 따른 오디오 처리
|
||||
private void HandleSceneAudio(string sceneName)
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
// 이미 같은 트랙이 재생 중이면 중복 재생하지 않음
|
||||
if (currentBGMTrack == sceneName) return;
|
||||
|
||||
// 씬에 맞는 BGM 재생
|
||||
if (sceneBGMMap.TryGetValue(sceneName, out AudioClip bgmClip))
|
||||
{
|
||||
if (bgmClip != null)
|
||||
{
|
||||
SoundManager.Instance.PlayBGM(bgmClip, true, 1.5f);
|
||||
currentBGMTrack = sceneName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 배경음 제어 (게임 오버, 승리도 이쪽)
|
||||
|
||||
// 게임 오버 시 호출
|
||||
public void PlayGameOverMusic()
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
if (gameOverBGM != null)
|
||||
{
|
||||
SoundManager.Instance.PlayBGM(gameOverBGM, true, 1.0f);
|
||||
currentBGMTrack = "GameOver";
|
||||
}
|
||||
}
|
||||
|
||||
// 승리 시 호출
|
||||
public void PlayVictoryMusic()
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
if (victoryBGM != null)
|
||||
{
|
||||
SoundManager.Instance.PlayBGM(victoryBGM, true, 1.0f);
|
||||
currentBGMTrack = "Victory";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 효과음 제어
|
||||
|
||||
// 버튼 클릭 효과음 재생
|
||||
public void PlayButtonClickSound()
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
SoundManager.Instance.PlaySFX("ButtonClick");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 몬스터 오디오
|
||||
|
||||
public void PlayMonsterAttackSound()
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
SoundManager.Instance.PlaySFX("MonsterAttack");
|
||||
}
|
||||
|
||||
public void PlayMonsterDeathSound()
|
||||
{
|
||||
if (SoundManager.Instance == null) return;
|
||||
|
||||
SoundManager.Instance.PlaySFX("MonsterDeath");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
11
Assets/Scripts/Common/GameUtility/GameSound.cs.meta
Normal file
11
Assets/Scripts/Common/GameUtility/GameSound.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f076e9ce37f6f564c961ee8a9393c09d
|
||||
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