Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
IDMhan 2024-04-16 01:04:03 +09:00
commit b102cfb48d
187 changed files with 3512 additions and 964 deletions

File diff suppressed because it is too large Load Diff

View File

@ -74005,6 +74005,93 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 255b521a4ec0ba34e8c5beb3bf3070e9, type: 3}
--- !u!1 &1217905475
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1217905477}
- component: {fileID: 1217905476}
m_Layer: 0
m_Name: CozyManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1217905476
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1217905475}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ecd53ea5c1735243b34e49068d0d5a1, type: 3}
m_Name:
m_EditorClassIdentifier:
_persistent: 1
forecastProfileRatioRatios:
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 0027c2e6b193a714a8eb685c997c0d64,
type: 2}
<WeatherType>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: 71e4f8dfa2ed34a55bce30f3bfa2272a,
type: 3}
<Ratio>k__BackingField: 5
<Percent>k__BackingField: 50
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 5a523a40c1d6ebe428e35ee14a8701d4,
type: 2}
<WeatherType>k__BackingField: 1
<Sprite>k__BackingField: {fileID: 21300000, guid: a8a54fa40924d413db6732d73e189a1a,
type: 3}
<Ratio>k__BackingField: 2
<Percent>k__BackingField: 20
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: f74505e0493b8da4699b1923a919cf67,
type: 2}
<WeatherType>k__BackingField: 2
<Sprite>k__BackingField: {fileID: 21300000, guid: ddfb83965c6804f6c9a36a3aa4510fa0,
type: 3}
<Ratio>k__BackingField: 1
<Percent>k__BackingField: 10
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 3bcdd4436fe68d14094f87ea1d18c708,
type: 2}
<WeatherType>k__BackingField: 3
<Sprite>k__BackingField: {fileID: 21300000, guid: 9c34e337368e14ccfbf9585b555454c9,
type: 3}
<Ratio>k__BackingField: 2
<Percent>k__BackingField: 20
defaultWeatherInfo:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 0027c2e6b193a714a8eb685c997c0d64,
type: 2}
<WeatherType>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: 71e4f8dfa2ed34a55bce30f3bfa2272a,
type: 3}
forecastWeatherCount: 7
weatherInfoList: []
changeWeatherTime: 0
--- !u!4 &1217905477
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1217905475}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1218198391
GameObject:
m_ObjectHideFlags: 0
@ -82845,18 +82932,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d17adf51a847d5a49b9b1b21927a8627, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1378769813 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8456277469957973202, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
m_PrefabInstance: {fileID: 3053208528833069657}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ecd53ea5c1735243b34e49068d0d5a1, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1379373900 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1563627856476138492, guid: a9b42b99a195f5d4bb8584e402ba48c1,
@ -127328,7 +127403,6 @@ MonoBehaviour:
<Time>k__BackingField: {fileID: 2140726696598709580}
<WeatherIcon>k__BackingField: {fileID: 171484715}
updateTime: 1
cozyController: {fileID: 1378769813}
--- !u!1001 &3053208528833069657
PrefabInstance:
m_ObjectHideFlags: 0
@ -127342,6 +127416,26 @@ PrefabInstance:
propertyPath: weatherSphere
value:
objectReference: {fileID: 1378769811}
- target: {fileID: 801807269746107489, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.5818737
objectReference: {fileID: 0}
- target: {fileID: 801807269746107489, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.12710221
objectReference: {fileID: 0}
- target: {fileID: 801807269746107489, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.7847813
objectReference: {fileID: 0}
- target: {fileID: 801807269746107489, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.17142452
objectReference: {fileID: 0}
- target: {fileID: 852466176626895017, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: weatherSphere
@ -127352,6 +127446,36 @@ PrefabInstance:
propertyPath: biomes.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.b
value: 0.71061313
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.g
value: 0.71061313
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.r
value: 0.85079896
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: TrailModule.colorOverLifetime.maxColor.b
value: 0.71061313
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: TrailModule.colorOverLifetime.maxColor.g
value: 0.71061313
objectReference: {fileID: 0}
- target: {fileID: 3364716749987171546, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: TrailModule.colorOverLifetime.maxColor.r
value: 0.85079896
objectReference: {fileID: 0}
- target: {fileID: 3666845812743212619, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: weatherSphere
@ -127362,6 +127486,31 @@ PrefabInstance:
propertyPath: biomes.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3719331654325222447, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.9714468
objectReference: {fileID: 0}
- target: {fileID: 3719331654325222447, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.23725747
objectReference: {fileID: 0}
- target: {fileID: 4191733567209412195, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.b
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4191733567209412195, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.g
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4191733567209412195, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.r
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5058033357134706229, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: weatherSphere
@ -127370,18 +127519,48 @@ PrefabInstance:
- target: {fileID: 5290961994918313947, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.3721239
value: -0.43593833
objectReference: {fileID: 0}
- target: {fileID: 5290961994918313947, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.9281831
value: 0.89997655
objectReference: {fileID: 0}
- target: {fileID: 5465818858273453228, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: satHolder
value:
objectReference: {fileID: 0}
- target: {fileID: 5736314083112230510, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_Color.b
value: 1.1535546
objectReference: {fileID: 0}
- target: {fileID: 5736314083112230510, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_Color.g
value: 1.3476623
objectReference: {fileID: 0}
- target: {fileID: 5736314083112230510, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_Color.r
value: 1.375392
objectReference: {fileID: 0}
- target: {fileID: 5909837257634811719, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.b
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5909837257634811719, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.g
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5909837257634811719, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: InitialModule.startColor.maxColor.r
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6024820775595674153, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: cozyEvents.Array.data[0].onPlay.m_PersistentCalls.m_Calls.Array.data[1].m_Target
@ -127395,17 +127574,17 @@ PrefabInstance:
- target: {fileID: 6474911501201492956, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalPosition.x
value: -37.29999
value: -18.58019
objectReference: {fileID: 0}
- target: {fileID: 6474911501201492956, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalPosition.y
value: 27.144754
value: 26.697802
objectReference: {fileID: 0}
- target: {fileID: 6474911501201492956, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalPosition.z
value: -42.87467
value: -35.267902
objectReference: {fileID: 0}
- target: {fileID: 6474911501201492956, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
@ -127457,6 +127636,31 @@ PrefabInstance:
propertyPath: weatherSphere
value:
objectReference: {fileID: 1378769811}
- target: {fileID: 7488497971003085491, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: yearPercentage
value: 0.00075
objectReference: {fileID: 0}
- target: {fileID: 7488497971003085491, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: modifiedDayPercentage
value: 0.784059
objectReference: {fileID: 0}
- target: {fileID: 7878254740279761662, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalScale.x
value: 1.7320508
objectReference: {fileID: 0}
- target: {fileID: 7878254740279761662, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalScale.y
value: 1.7320508
objectReference: {fileID: 0}
- target: {fileID: 7878254740279761662, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: m_LocalScale.z
value: 1.7320508
objectReference: {fileID: 0}
- target: {fileID: 8211506079654505266, guid: be1d50d0f9a83864698b17f9e155db2d,
type: 3}
propertyPath: weatherSphere
@ -129378,6 +129582,7 @@ SceneRoots:
- {fileID: 634993279}
- {fileID: 1540310984}
- {fileID: 1683670877}
- {fileID: 1217905477}
- {fileID: 826757675}
- {fileID: 825646228}
- {fileID: 7575745927192305431}

View File

@ -9,11 +9,10 @@ using Random = UnityEngine.Random;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public class Boid : MonoBehaviour
public class Boid : MonoBehaviour, IDroppable
{
[field: Title("FishInfo")]
[field: SerializeField] public FishItem FishItem { get; private set; }
[field: SerializeField] public Vector2 RandomCount { get; private set; } = new(1, 4);
[field: SerializeField] public DropItemTable DropItemTable { get; set; }
[Title("개체 설정")]
[SerializeField] private float obstacleDistance = 10;
@ -42,7 +41,6 @@ namespace BlueWaterProject
myBoids = boids;
moveSpeed = speed;
hitColliders = new Collider[maxNeighbourCount];
FishItem.ItemCount = Random.Range((int)RandomCount.x, (int)RandomCount.y);
findNeighbourCoroutine ??= StartCoroutine("FindNeighbourCoroutine");
calculateEgoVectorCoroutine ??= StartCoroutine("CalculateEgoVectorCoroutine");

View File

@ -331,9 +331,8 @@ namespace BlueWaterProject
//var y = Random.Range(bounds.min.y, bounds.max.y);
var z = Random.Range(bounds.min.z, bounds.max.z);
var randomPos = new Vector3(x, 0, z);
var catchItem = new FishItem(currentBoid.FishItem.ItemName, currentBoid.FishItem.ItemCount, currentBoid.FishItem.ItemIcon);
ItemDropManager.Inst.DropItem(catchItem, randomPos);
currentBoid.DropItemTable.ItemDrop(randomPos);
boidList.RemoveAt(0);
Destroy(currentBoid.gameObject);
@ -374,7 +373,5 @@ namespace BlueWaterProject
}
}
}
public FishItem GetBoidInfo() => boidPrefab.FishItem;
}
}

View File

@ -108,7 +108,7 @@ namespace BlueWaterProject
{
var finalVelocity = rb.position + dashDirection * (dashSpeed * Time.fixedDeltaTime);
rb.MovePosition(finalVelocity);
yield return null;
yield return new WaitForFixedUpdate();
}
Animator.speed = 1f;

View File

@ -9,7 +9,7 @@ using UnityEngine.UI;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public abstract class Enemy : BaseCharacter, IDamageable, IAiView, IHelpCall
public abstract class Enemy : BaseCharacter, IDamageable, IAiView, IHelpCall, IDroppable
{
#region Properties and variables
@ -96,6 +96,9 @@ namespace BlueWaterProject
[DisableIf("@true")]
[SerializeField] protected bool beAttacked;
[field: Title("드롭 아이템")]
[field: SerializeField] public DropItemTable DropItemTable { get; set; }
// 일반 변수
protected bool isAttacking;
@ -311,6 +314,7 @@ namespace BlueWaterProject
StartCoroutine(nameof(BeAttacked));
}
[Button("Die테스트")]
public void Die()
{
myAnimator?.SetTrigger(DieHash);
@ -318,8 +322,15 @@ namespace BlueWaterProject
Agent.isStopped = true;
Agent.enabled = false;
Destroy(hpSlider.gameObject, 2f);
Destroy(gameObject, 2f);
Invoke(nameof(DieEvent), 2f);
}
private void DieEvent()
{
DropItemTable?.ItemDrop(transform.position + Vector3.up * 0.5f);
Destroy(hpSlider.gameObject);
Destroy(gameObject);
}
public float GetCurrentHp() => CurrentHp;

View File

@ -8,6 +8,8 @@ namespace BlueWaterProject
{
#region Properties and variables
public DropItemTable DropItemTable { get; set; }
// Hash
protected static readonly int AttackHash = Animator.StringToHash("Attack");
protected static readonly int AttackStateHash = Animator.StringToHash("AttackState");

View File

@ -14,6 +14,7 @@ namespace BlueWaterProject
[field: SerializeField] public Canvas WorldSpaceCanvas { get; private set; }
[field: SerializeField] public SkillUi MainSkillUi { get; private set; }
[field: SerializeField] public FieldBossHpSlider FieldBossHpSlider { get; private set; }
[field: SerializeField] public DropItemGroupController DropItemGroupController { get; set; }
[Button("셋팅 초기화")]
@ -29,6 +30,7 @@ namespace BlueWaterProject
WorldSpaceCanvas = GameObject.Find("WorldSpaceCanvas").GetComponent<Canvas>();
MainSkillUi = MainCanvas.transform.Find("MainSkillUi").GetComponent<SkillUi>();
FieldBossHpSlider = MainCanvas.transform.Find("FieldBossHpSlider").GetComponent<FieldBossHpSlider>();
DropItemGroupController = MainCanvas.transform.Find("DropItemGroup").GetComponent<DropItemGroupController>();
}
private void Awake()

View File

@ -96,6 +96,7 @@ namespace BlueWaterProject
public MeridiemTime CurrentTime => CozyWeather.instance.timeModule.currentTime;
private float totalRatio;
private float previousTimeMovementSpeed;
#endregion
@ -123,15 +124,14 @@ namespace BlueWaterProject
private void InitStart()
{
if (weatherInfoList != null)
{
weatherInfoList = new List<WeatherInfo>(forecastWeatherCount);
if (weatherInfoList == null || weatherInfoList.Count != 0) return;
weatherInfoList = new List<WeatherInfo>(forecastWeatherCount);
for (var i = 0; i < forecastWeatherCount; i++)
{
var newWeatherInfo = new WeatherInfo(GetWeatherInfo());
weatherInfoList.Add(newWeatherInfo);
}
for (var i = 0; i < forecastWeatherCount; i++)
{
var newWeatherInfo = new WeatherInfo(GetWeatherInfo());
weatherInfoList.Add(newWeatherInfo);
}
SetForecastProfile(weatherInfoList?[0].ForecastProfile);
@ -222,6 +222,21 @@ namespace BlueWaterProject
return defaultWeatherInfo;
}
[Button("시간 정지")]
public void PauseTime()
{
previousTimeMovementSpeed = CozyWeather.instance.perennialProfile.timeMovementSpeed;
CozyWeather.instance.perennialProfile.pauseTime = true;
CozyWeather.instance.perennialProfile.timeMovementSpeed = 0f;
}
[Button("시간 재시작")]
public void ResumeTime()
{
CozyWeather.instance.perennialProfile.pauseTime = true;
CozyWeather.instance.perennialProfile.timeMovementSpeed = previousTimeMovementSpeed;
}
#endregion
}
}

View File

@ -5,10 +5,10 @@ using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public class DestructibleObject : MonoBehaviour
public class DestructibleObject : MonoBehaviour, IDroppable
{
[Title("기본 설정")]
[SerializeField] private Item itemInfo;
[field: Title("기본 설정")]
[field: SerializeField] public DropItemTable DropItemTable { get; set; }
[field: SerializeField] public int Strength { get; private set; } = 100;
[SerializeField] private float power = 10f;
[SerializeField] private float damageCooldown = 2f;
@ -58,7 +58,7 @@ namespace BlueWaterProject
{
rb.isKinematic = false;
rayfire.Demolish();
ItemDropManager.Inst.DropItem(itemInfo, other.collider.bounds.center);
DropItemTable.ItemDrop(other.collider.bounds.center);
}
private void Hit(IDestructible iDestructible)

View File

@ -1,17 +0,0 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[Serializable]
public class FishItem : Item
{
public FishItem(string name, int count = 1, Sprite icon = null) : base(name, count, icon)
{
ItemName = name;
ItemCount = count;
ItemIcon = icon;
}
}
}

View File

@ -0,0 +1,8 @@
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public interface IDroppable
{
DropItemTable DropItemTable { get; set; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6854caf0ffda1c442b680972b90386d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 9aacf6f3043624194bb6f6fe9a580786
guid: 1dc19499282157048bb61ce8c379dd3b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,15 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[CreateAssetMenu(fileName = "CurrencyItem", menuName = "ScriptableObjects/Item/CurrencyItem")]
public class CurrencyItem : Item
{
public override void Use()
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6864b0bdcf8edb441bea59200141b76b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 697b6e7dea1fde146b7e3e5cf3ed9e9f
guid: d2b514a8422c5d14ba297dcaf64ebb45
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: BigBarrelDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: b6bf3a02ded696840a990636e2151830,
type: 2}
<Ratio>k__BackingField: 50
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 0bb294b26cbcae54a8508211b077a88d,
type: 3}
- <Item>k__BackingField: {fileID: 11400000, guid: b60d264f0506e60469c4ad5cffb8c6ba,
type: 2}
<Ratio>k__BackingField: 30
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 0bb294b26cbcae54a8508211b077a88d,
type: 3}
- <Item>k__BackingField: {fileID: 11400000, guid: 53c414221cf3e8b4f851d61aead8fd50,
type: 2}
<Ratio>k__BackingField: 20
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 0bb294b26cbcae54a8508211b077a88d,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0cbd0ef58813bb848a45b92be06ede0a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: OrkDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: b6bf3a02ded696840a990636e2151830,
type: 2}
<Ratio>k__BackingField: 75
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 8ab179a0b6cfa1740a787520a9d2c722,
type: 3}
- <Item>k__BackingField: {fileID: 11400000, guid: b60d264f0506e60469c4ad5cffb8c6ba,
type: 2}
<Ratio>k__BackingField: 25
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 8ab179a0b6cfa1740a787520a9d2c722,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7fcad3b0fc594ad42b475372772eded3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: SmallBarrelDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: b6bf3a02ded696840a990636e2151830,
type: 2}
<Ratio>k__BackingField: 75
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 0bb294b26cbcae54a8508211b077a88d,
type: 3}
- <Item>k__BackingField: {fileID: 11400000, guid: b60d264f0506e60469c4ad5cffb8c6ba,
type: 2}
<Ratio>k__BackingField: 25
<Count>k__BackingField: {x: 1, y: 1}
prefab: {fileID: 4185765918994780331, guid: 0bb294b26cbcae54a8508211b077a88d,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 05eadc282e9d88f4394eee3679190a71
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 078b8f13a17171b49892ad10426d5af0
guid: d3b763a48948d4e409d1fcabc8284225
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6864b0bdcf8edb441bea59200141b76b, type: 3}
m_Name: 1000Coin
m_EditorClassIdentifier:
id: Currency003
name: "1000\uCF54\uC778"
icon: {fileID: 21300000, guid: 42166f232ee914f4997bc503de7c4ab7, type: 3}
description:
price: 1000
weight: 0
rarity: 0
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 53c414221cf3e8b4f851d61aead8fd50
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6864b0bdcf8edb441bea59200141b76b, type: 3}
m_Name: 100Coin
m_EditorClassIdentifier:
id: Currency001
name: "100\uCF54\uC778"
icon: {fileID: 21300000, guid: 1e68d32ca9d274421aa1325f2e9fc380, type: 3}
description:
price: 100
weight: 0
rarity: 0
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b6bf3a02ded696840a990636e2151830
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6864b0bdcf8edb441bea59200141b76b, type: 3}
m_Name: 500Coin
m_EditorClassIdentifier:
id: Currency002
name: "500\uCF54\uC778"
icon: {fileID: 21300000, guid: d06e32d389f004b02b646c7e8967d1e6, type: 3}
description:
price: 500
weight: 0
rarity: 0
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b60d264f0506e60469c4ad5cffb8c6ba
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,10 +6,13 @@ using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public class ItemController : MonoBehaviour
public class DropItemController : MonoBehaviour
{
[Title("컴포넌트")]
[SerializeField] private SpriteRenderer spriteRenderer;
[SerializeField] private AudioSource audioSource;
[Title("아이템")]
[SerializeField] private Item item;
[SerializeField] private GameObject itemUiPrefab;
[SerializeField] private GameObject pointingArrowUiPrefab;
[ShowIf("@pointingArrowUiPrefab")]
@ -26,10 +29,11 @@ namespace BlueWaterProject
[SerializeField] private float acquisitionTime = 1f;
[SerializeField] private LayerMask targetLayer;
private ItemInstance itemInstance;
private int itemCount;
private Collider[] hitColliders = new Collider[1];
private Collider targetCollider;
private WaitForSeconds lootCoroutineTime = new(0.5f);
private AudioSource audioSource;
private ItemUiController itemLootUi;
private Transform pointingArrowUi;
@ -40,24 +44,28 @@ namespace BlueWaterProject
Gizmos.DrawWireSphere(transform.position, radius);
}
public void Init(Item newItem)
public void Init(ItemInstance newItemInstance, int count)
{
item = newItem;
itemInstance = newItemInstance;
itemCount = count;
if (spriteRenderer)
{
spriteRenderer.sprite = itemInstance.Item.icon;
}
var myPos = transform.position;
var screenPos = CameraManager.Inst.MainCam.WorldToScreenPoint(myPos);
itemLootUi = Instantiate(itemUiPrefab, screenPos, Quaternion.identity, UiManager.Inst.OceanUi.ItemsLoot).GetComponent<ItemUiController>();
if (itemUiPrefab)
{
itemLootUi = Instantiate(itemUiPrefab, screenPos, Quaternion.identity, UiManager.Inst.OceanUi.ItemsLoot).GetComponent<ItemUiController>();
itemLootUi.Init(transform);
}
if (pointingArrowUiPrefab)
{
pointingArrowUi = Instantiate(pointingArrowUiPrefab, screenPos, Quaternion.identity, UiManager.Inst.OceanUi.InstantiateUi).transform;
pointingArrowUi.gameObject.SetActive(false);
}
itemLootUi.Init(transform);
}
private void Awake()
{
audioSource = transform.parent.Find("Audio").GetComponent<AudioSource>();
}
private void Start()
@ -84,7 +92,10 @@ namespace BlueWaterProject
if (maxSize > 0)
{
targetCollider = hitColliders[0];
itemLootUi.ItemAcquisition();
if (itemLootUi)
{
itemLootUi.ItemAcquisition();
}
break;
}
@ -100,13 +111,31 @@ namespace BlueWaterProject
var t = elapsedTime / acquisitionTime;
t = Mathf.SmoothStep(0f, 1f, t);
transform.position = Vector3.Lerp(startPosition, targetCollider.transform.position, t);
transform.parent.position = Vector3.Lerp(startPosition, targetCollider.bounds.center, t);
yield return null;
}
item.Acquire();
itemLootUi.gameObject.SetActive(false);
UiManager.Inst.OceanUi.DropItemGroupController.ShowDropItemInfoUi(item);
itemInstance.Item.Acquire(itemCount);
if (itemLootUi)
{
itemLootUi.gameObject.SetActive(false);
}
if (spriteRenderer)
{
spriteRenderer.gameObject.SetActive(false);
}
DropItemGroupController dropItemGroupController = null;
if (UiManager.Inst.OceanUi)
{
dropItemGroupController = UiManager.Inst.OceanUi.DropItemGroupController;
}
else if (UiManager.Inst.CombatUi)
{
dropItemGroupController = UiManager.Inst.CombatUi.DropItemGroupController;
}
dropItemGroupController?.ShowDropItemInfoUi(itemInstance.Item, itemCount);
if (audioSource && audioSource.resource)
{
@ -116,7 +145,10 @@ namespace BlueWaterProject
yield return new WaitForSeconds(audioSource.clip.length);
Destroy(transform.parent.gameObject);
Destroy(itemLootUi.gameObject);
if (itemLootUi)
{
Destroy(itemLootUi.gameObject);
}
}
private void PointingArrowUi()

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e474579c3021c964cb86b13cbec28e89

View File

@ -11,12 +11,12 @@ namespace BlueWaterProject
private WaitForSeconds coroutineRestartTime = new(0.5f);
public void ShowDropItemInfoUi(IItem iItem)
public void ShowDropItemInfoUi(Item item, int count)
{
StartCoroutine(ShowDropItemInfoUiCoroutine(iItem));
StartCoroutine(ShowDropItemInfoUiCoroutine(item, count));
}
private IEnumerator ShowDropItemInfoUiCoroutine(IItem iItem)
private IEnumerator ShowDropItemInfoUiCoroutine(Item item, int count)
{
while (true)
{
@ -24,8 +24,8 @@ namespace BlueWaterProject
{
if (list.UiView.gameObject.activeSelf) continue;
var itemText = iItem.ItemName + " x" + iItem.ItemCount;
list.SetInfo(iItem.ItemIcon, itemText);
var itemText = item.name + " x" + count;
list.SetInfo(item.icon, itemText);
list.ShowUi();
while (list.UiView.gameObject.activeSelf)

View File

@ -0,0 +1,45 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[CreateAssetMenu(fileName = "DropItemTable", menuName = "ScriptableObjects/Item/DropItemTable")]
public class DropItemTable : ScriptableObject
{
public List<ItemInstance> itemInstanceList = new();
private ItemInstance PickItem()
{
var count = itemInstanceList.Count;
if (count == 0) return null;
var sumRatio = itemInstanceList.Sum(element => element.Ratio);
var randomRatio = Random.Range(0, sumRatio);
for (var i = 0; i < count; i++)
{
randomRatio -= itemInstanceList[i].Ratio;
if (randomRatio < 0)
{
return itemInstanceList[i];
}
}
return null;
}
public void ItemDrop(Vector3 dropPosition)
{
var dropItem = PickItem();
if (dropItem == null) return;
var dropCount = Random.Range((int)dropItem.Count.x, (int)dropItem.Count.y + 1);
var instantiateItem = dropItem.Item.InstantiateItem(dropItem.prefab, dropPosition);
instantiateItem.GetComponentInChildren<DropItemController>().Init(dropItem, dropCount);
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 48105e29cecfc3e4581b32f903be682a

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: f9406a33814af9c47b352e77f079d798
guid: e038312b42cc90a4baf47bd5a30f4db5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 60e11d9b2097a16419495aaa7d494a0e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: HammerheadSharkDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: 5adade6dd915b424e8de993bea9e3eb1,
type: 2}
<Ratio>k__BackingField: 1
<Count>k__BackingField: {x: 1, y: 10}
prefab: {fileID: 4185765918994780331, guid: 3e821daa41aac7d47b39f8cfebac29d0,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c51eff58445ec1e46ab8087108f66d18
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: MackerelDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: e67e7a41d059c6747960d8e91b37b29d,
type: 2}
<Ratio>k__BackingField: 1
<Count>k__BackingField: {x: 1, y: 3}
prefab: {fileID: 4185765918994780331, guid: 3e821daa41aac7d47b39f8cfebac29d0,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 06a066700640ea048830e1eb2f1881cd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48105e29cecfc3e4581b32f903be682a, type: 3}
m_Name: StingrayDropTable
m_EditorClassIdentifier:
itemInstanceList:
- <Item>k__BackingField: {fileID: 11400000, guid: 0205e1f648508a547b6cc1a05030c7eb,
type: 2}
<Ratio>k__BackingField: 1
<Count>k__BackingField: {x: 1, y: 5}
prefab: {fileID: 4185765918994780331, guid: 3e821daa41aac7d47b39f8cfebac29d0,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a526734a70dfd254e8ecb570e1474540
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[CreateAssetMenu(fileName = "FishItem", menuName = "ScriptableObjects/Item/FishItem")]
public class FishItem : Item
{
public override void Use()
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4c0827f818961ec40aef0fa01bd0446d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b3396bf949f48594b8c7bbe40d37dffa, type: 3}
m_Name: HammerheadShark
m_EditorClassIdentifier:
id: Fish002
name: "\uB9DD\uCE58\uBA38\uB9AC\uC0C1\uC5B4"
icon: {fileID: 21300000, guid: 06d43d70fa65dda4b9fd661589fa76e0, type: 3}
description: "\uB9DD\uCE58\uBA38\uB9AC\uC0C1\uC5B4\uC785\uB2C8\uB2E4."
price: 1000
weight: 10
rarity: 2
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5adade6dd915b424e8de993bea9e3eb1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b3396bf949f48594b8c7bbe40d37dffa, type: 3}
m_Name: Mackerel
m_EditorClassIdentifier:
id: Fish001
name: "\uACE0\uB4F1\uC5B4"
icon: {fileID: 21300000, guid: 27d2d9a014b4b7e418f48feca49d26c2, type: 3}
description: "\uACE0\uB4F1\uC5B4\uC785\uB2C8\uB2E4."
price: 100
weight: 1
rarity: 0
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e67e7a41d059c6747960d8e91b37b29d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b3396bf949f48594b8c7bbe40d37dffa, type: 3}
m_Name: Stingray
m_EditorClassIdentifier:
id: Fish003
name: "\uAC00\uC624\uB9AC"
icon: {fileID: 21300000, guid: 95f00a57ff000bd4c9b702268612de6f, type: 3}
description: "\uAC00\uC624\uB9AC\uC785\uB2C8\uB2E4."
price: 500
weight: 5
rarity: 1
prefab: {fileID: 4185765918994780331, guid: cded349812c1d624d9cc649e63d1b868, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0205e1f648508a547b6cc1a05030c7eb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[Serializable]
public class InventoryItem
{
[field: Tooltip("아이템 데이터")]
[field: SerializeField] public Item Item { get; set; }
[field: Tooltip("아이템 수량")]
[field: SerializeField] public int Count { get; set; }
public InventoryItem(Item item, int count)
{
Item = item;
Count = count;
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9d4fd7f55d96e5e44bee1fca643b87ad

View File

@ -1,26 +1,51 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[Serializable]
public class Item : IItem
public enum ItemRarity
{
[field: SerializeField] public string ItemName { get; set; }
[field: SerializeField] public int ItemCount { get; set; }
[field: SerializeField] public Sprite ItemIcon { get; set; }
COMMON,
UNCOMMON,
RARE,
LEGENDARY
}
[CreateAssetMenu(fileName = "Item", menuName = "ScriptableObjects/Item/BaseItem")]
public abstract class Item : ScriptableObject
{
[Tooltip("고유 식별 ID")]
public string id;
[Tooltip("이름")]
public string name;
[Tooltip("아이콘")]
public Sprite icon;
[Tooltip("설명"), TextArea(3, 10)]
public string description;
[Tooltip("가격")]
public int price;
[Tooltip("무게")]
public int weight;
[Tooltip("등급")]
public ItemRarity rarity;
public Item(string name, int count = 1, Sprite icon = null)
public abstract void Use();
public void Acquire(int count)
{
ItemName = name;
ItemCount = count;
ItemIcon = icon;
DataManager.Inst.PlayerInventory.AddItem(this, count);
}
public void Acquire()
public GameObject InstantiateItem(GameObject prefab, Vector3 position, Quaternion rotation = default)
{
DataManager.Inst.PlayerInventory.AddItem(this);
var instantiateItem = Instantiate(prefab, position, rotation);
return instantiateItem;
}
}
}

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: c3ea0c13f4edde747b6d5eb5d6842905

View File

@ -1,27 +0,0 @@
using Sirenix.OdinInspector;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public class ItemDropManager : Singleton<ItemDropManager>
{
[field: Title("아이템")]
[field: SerializeField] public GameObject ItemPrefab { get; private set; }
[SerializeField] private Transform instantiateObjects;
[SerializeField] private Transform items;
[Button("셋팅 초기화")]
private void Init()
{
instantiateObjects = GameObject.Find("InstantiateObjects").transform;
items = instantiateObjects.transform.Find("Items");
}
public void DropItem(Item item, Vector3 dropPosition)
{
var itemController = Instantiate(ItemPrefab, dropPosition, Quaternion.identity, items).GetComponentInChildren<ItemController>();
itemController.Init(item);
}
}
}

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: bb206c5a6ef8a5c4699d0abf67531d7d

View File

@ -0,0 +1,29 @@
using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[Serializable]
public class ItemInstance
{
[field: Tooltip("아이템 데이터")]
[field: SerializeField] public Item Item { get; set; }
[field: Tooltip("아이템 드롭 비율")]
[field: SerializeField] public int Ratio { get; set; }
[field: Tooltip("아이템 랜덤 드롭 갯수")]
[field: SerializeField] public Vector2 Count { get; set; }
[Tooltip("프리팹")]
public GameObject prefab;
public ItemInstance(Item item, int ratio, Vector2 count)
{
Item = item;
Ratio = ratio;
Count = count;
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ebefd09a780905745be9e291f40dcb9e

View File

@ -8,19 +8,19 @@ namespace BlueWaterProject
[Serializable]
public class PlayerInventory
{
[SerializeField] private List<Item> items = new();
[SerializeField] private List<InventoryItem> inventoryItemList = new();
public void AddItem(IItem item)
public void AddItem(Item item, int count)
{
var existingItem = items.Find(i => i.ItemName == item.ItemName);
var existingItem = inventoryItemList.Find(i => i.Item.name == item.name);
if (existingItem != null)
{
existingItem.ItemCount += item.ItemCount;
existingItem.Count += count;
}
else
{
items.Add(new Item(item.ItemName, item.ItemCount));
inventoryItemList.Add(new InventoryItem(item, count));
}
}
}

View File

@ -23,7 +23,7 @@ namespace BlueWaterProject
private IEnumerator TimeCoroutine()
{
while (!CozyManager.Inst)
while (!CozyWeather.instance || !CozyManager.Inst)
{
yield return new WaitForSeconds(updateTime);
}

View File

@ -66,21 +66,38 @@ public abstract class Singleton<T> : Singleton where T : MonoBehaviour
#endregion
#region Methods
// protected virtual void Awake()
// {
// if (_persistent)
// {
// if (_instance == null)
// {
// DontDestroyOnLoad(gameObject);
// }
// else if (_instance != this)
// {
// Destroy(_instance.gameObject);
// DontDestroyOnLoad(gameObject);
// }
// }
// OnAwake();
// }
protected virtual void Awake()
{
if (_persistent)
{
if (_instance == null)
{
DontDestroyOnLoad(gameObject);
_instance = this as T; // 명시적 타입 변환
DontDestroyOnLoad(gameObject); // 씬 전환 시 파괴되지 않도록 설정
}
else if (_instance != this)
{
Destroy(_instance.gameObject);
DontDestroyOnLoad(gameObject);
Destroy(gameObject); // 현재 인스턴스가 _instance와 다르면 현재 오브젝트를 파괴
}
}
OnAwake();
OnAwake(); // 추가 초기화 작업
}
protected virtual void OnAwake() { }

View File

@ -134,11 +134,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b5a4bdb4c510d354687a785c3f642878, type: 3}
m_Name:
m_EditorClassIdentifier:
<FishItem>k__BackingField:
<ItemName>k__BackingField: "\uB9DD\uCE58\uBA38\uB9AC\uC0C1\uC5B4"
<ItemCount>k__BackingField: 0
<ItemIcon>k__BackingField: {fileID: 21300000, guid: 06d43d70fa65dda4b9fd661589fa76e0,
type: 3}
<DropItemTable>k__BackingField: {fileID: 11400000, guid: c51eff58445ec1e46ab8087108f66d18,
type: 2}
<RandomCount>k__BackingField: {x: 10, y: 1}
obstacleDistance: 10
viewAngle: 120

View File

@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 5402562142639805275}
- component: {fileID: 2102284208022651341}
m_Layer: 16
m_Name: SmallFish
m_Name: Mackerel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -46,11 +46,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b5a4bdb4c510d354687a785c3f642878, type: 3}
m_Name:
m_EditorClassIdentifier:
<FishItem>k__BackingField:
<ItemName>k__BackingField: "\uAE08\uBD95\uC5B4"
<ItemCount>k__BackingField: 0
<ItemIcon>k__BackingField: {fileID: 21300000, guid: 27d2d9a014b4b7e418f48feca49d26c2,
type: 3}
<DropItemTable>k__BackingField: {fileID: 11400000, guid: 06a066700640ea048830e1eb2f1881cd,
type: 2}
<RandomCount>k__BackingField: {x: 1, y: 4}
obstacleDistance: 10
viewAngle: 120

View File

@ -46,11 +46,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b5a4bdb4c510d354687a785c3f642878, type: 3}
m_Name:
m_EditorClassIdentifier:
<FishItem>k__BackingField:
<ItemName>k__BackingField: "\uAC00\uC624\uB9AC"
<ItemCount>k__BackingField: 0
<ItemIcon>k__BackingField: {fileID: 21300000, guid: 95f00a57ff000bd4c9b702268612de6f,
type: 3}
<DropItemTable>k__BackingField: {fileID: 11400000, guid: a526734a70dfd254e8ecb570e1474540,
type: 2}
<RandomCount>k__BackingField: {x: 5, y: 7}
obstacleDistance: 10
viewAngle: 120

View File

@ -56,7 +56,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2904555701463989287}
serializedVersion: 2
m_LocalRotation: {x: -0, y: 0.8923784, z: -0, w: -0.45128796}
m_LocalRotation: {x: -0, y: 0.25137052, z: -0, w: 0.967891}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -15339,7 +15339,6 @@ GameObject:
m_Component:
- component: {fileID: 6474911501201492956}
- component: {fileID: 8689183696743911946}
- component: {fileID: 8456277469957973202}
m_Layer: 0
m_Name: Cozy Weather Sphere
m_TagString: Untagged
@ -15642,61 +15641,6 @@ MonoBehaviour:
- {fileID: 8211506079654505266}
- {fileID: 9001687184104456616}
- {fileID: 6024820775595674153}
--- !u!114 &8456277469957973202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6957699880562218212}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ecd53ea5c1735243b34e49068d0d5a1, type: 3}
m_Name:
m_EditorClassIdentifier:
_persistent: 1
forecastProfileRatioRatios:
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 0027c2e6b193a714a8eb685c997c0d64,
type: 2}
<WeatherType>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: 71e4f8dfa2ed34a55bce30f3bfa2272a,
type: 3}
<Ratio>k__BackingField: 5
<Percent>k__BackingField: 50
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 5a523a40c1d6ebe428e35ee14a8701d4,
type: 2}
<WeatherType>k__BackingField: 1
<Sprite>k__BackingField: {fileID: 21300000, guid: a8a54fa40924d413db6732d73e189a1a,
type: 3}
<Ratio>k__BackingField: 2
<Percent>k__BackingField: 20
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: f74505e0493b8da4699b1923a919cf67,
type: 2}
<WeatherType>k__BackingField: 2
<Sprite>k__BackingField: {fileID: 21300000, guid: ddfb83965c6804f6c9a36a3aa4510fa0,
type: 3}
<Ratio>k__BackingField: 1
<Percent>k__BackingField: 10
- <WeatherInfo>k__BackingField:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 3bcdd4436fe68d14094f87ea1d18c708,
type: 2}
<WeatherType>k__BackingField: 3
<Sprite>k__BackingField: {fileID: 21300000, guid: 9c34e337368e14ccfbf9585b555454c9,
type: 3}
<Ratio>k__BackingField: 2
<Percent>k__BackingField: 20
defaultWeatherInfo:
<ForecastProfile>k__BackingField: {fileID: 11400000, guid: 0027c2e6b193a714a8eb685c997c0d64,
type: 2}
<WeatherType>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: 71e4f8dfa2ed34a55bce30f3bfa2272a,
type: 3}
forecastWeatherCount: 7
weatherInfoList: []
changeWeatherTime: 0
--- !u!1 &7278096381754628357
GameObject:
m_ObjectHideFlags: 0
@ -16091,7 +16035,7 @@ MonoBehaviour:
mainMoon: 0
useLight: 1
moonlightShadows: 2
moonLensFlare: {fileID: 8921906008492426010}
moonLensFlare: {fileID: 0}
--- !u!114 &8211506079654505266
MonoBehaviour:
m_ObjectHideFlags: 0
@ -16147,7 +16091,7 @@ MonoBehaviour:
weatherSelectionMode: 1
currentForecast: []
weatherTransitionTime: 10
weatherSphere: {fileID: 8689183696743911946}
weatherSphere: {fileID: 0}
system: {fileID: 8689183696743911946}
currentWeather: {fileID: 11400000, guid: 2699615a216114243b332ecb8a97a94c, type: 2}
weatherChangeCheck: {fileID: 11400000, guid: 2699615a216114243b332ecb8a97a94c,
@ -16474,7 +16418,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalScale: {x: 1.7320508, y: 1.7320508, z: 1.7320508}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7683426934664973782}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cebac0aec1b57e0448975a7284bc5691
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -139,7 +139,7 @@ GameObject:
m_Component:
- component: {fileID: 726335702565593345}
m_Layer: 0
m_Name: ItemDrop
m_Name: DropItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -171,9 +171,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 816226554442943762}
- component: {fileID: 9212167707718790757}
- component: {fileID: 1871283123640341369}
m_Layer: 21
m_Name: ItemController
m_Name: DropItemController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -194,7 +194,7 @@ Transform:
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &9212167707718790757
--- !u!114 &1871283123640341369
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -203,17 +203,16 @@ MonoBehaviour:
m_GameObject: {fileID: 7996128800962867104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c3ea0c13f4edde747b6d5eb5d6842905, type: 3}
m_Script: {fileID: 11500000, guid: e474579c3021c964cb86b13cbec28e89, type: 3}
m_Name:
m_EditorClassIdentifier:
item:
<ItemName>k__BackingField:
<ItemCount>k__BackingField: 0
<ItemIcon>k__BackingField: {fileID: 0}
spriteRenderer: {fileID: 0}
audioSource: {fileID: 8975262077732393561}
itemUiPrefab: {fileID: 3090447943159425444, guid: 0d213e978cd398441bcd61573163ca16,
type: 3}
pointingArrowUiPrefab: {fileID: 3183496459896387822, guid: 71ca57d34077f5d4492c5d47fb465d59,
type: 3}
arrowOffset: 10
useAutoDestroy: 0
autoDestroyTime: 30
drawGizmos: 1

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 540ae6456b3be064d8f6cb8d56ce7f12
guid: cded349812c1d624d9cc649e63d1b868
PrefabImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,308 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1733947209264972765
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6499268732264954890}
- component: {fileID: 8975262077732393561}
m_Layer: 0
m_Name: Audio
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6499268732264954890
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733947209264972765}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &8975262077732393561
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733947209264972765}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: de54536a55703434b8ad53b9a7da3d35, type: 3}
m_Resource: {fileID: 8300000, guid: de54536a55703434b8ad53b9a7da3d35, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &4185765918994780331
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 726335702565593345}
m_Layer: 0
m_Name: FieldDropItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &726335702565593345
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4185765918994780331}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 816226554442943762}
- {fileID: 994959806070393769}
- {fileID: 6499268732264954890}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6718783098392052893
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 994959806070393769}
- component: {fileID: 4385550810937580112}
m_Layer: 0
m_Name: VisualLook
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &994959806070393769
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6718783098392052893}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4385550810937580112
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6718783098392052893}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &7996128800962867104
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 816226554442943762}
- component: {fileID: 1871283123640341369}
m_Layer: 21
m_Name: DropItemController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &816226554442943762
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7996128800962867104}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1871283123640341369
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7996128800962867104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e474579c3021c964cb86b13cbec28e89, type: 3}
m_Name:
m_EditorClassIdentifier:
spriteRenderer: {fileID: 4385550810937580112}
audioSource: {fileID: 8975262077732393561}
itemUiPrefab: {fileID: 0}
pointingArrowUiPrefab: {fileID: 0}
arrowOffset: 10
useAutoDestroy: 0
autoDestroyTime: 30
drawGizmos: 1
radius: 3
acquisitionTime: 1.5
targetLayer:
serializedVersion: 2
m_Bits: 512

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8ab179a0b6cfa1740a787520a9d2c722
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -139,7 +139,7 @@ GameObject:
m_Component:
- component: {fileID: 726335702565593345}
m_Layer: 0
m_Name: BarrelItemDrop
m_Name: FishDropItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -171,9 +171,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 816226554442943762}
- component: {fileID: 9212167707718790757}
- component: {fileID: 1871283123640341369}
m_Layer: 21
m_Name: ItemController
m_Name: DropItemController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -194,7 +194,7 @@ Transform:
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &9212167707718790757
--- !u!114 &1871283123640341369
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -203,17 +203,16 @@ MonoBehaviour:
m_GameObject: {fileID: 7996128800962867104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c3ea0c13f4edde747b6d5eb5d6842905, type: 3}
m_Script: {fileID: 11500000, guid: e474579c3021c964cb86b13cbec28e89, type: 3}
m_Name:
m_EditorClassIdentifier:
item:
<ItemName>k__BackingField:
<ItemCount>k__BackingField: 0
<ItemIcon>k__BackingField: {fileID: 0}
spriteRenderer: {fileID: 0}
audioSource: {fileID: 8975262077732393561}
itemUiPrefab: {fileID: 3090447943159425444, guid: 0d213e978cd398441bcd61573163ca16,
type: 3}
pointingArrowUiPrefab: {fileID: 3183496459896387822, guid: 71ca57d34077f5d4492c5d47fb465d59,
type: 3}
arrowOffset: 10
useAutoDestroy: 0
autoDestroyTime: 30
drawGizmos: 1

View File

@ -0,0 +1,223 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1733947209264972765
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6499268732264954890}
- component: {fileID: 8975262077732393561}
m_Layer: 0
m_Name: Audio
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6499268732264954890
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733947209264972765}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &8975262077732393561
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733947209264972765}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: de54536a55703434b8ad53b9a7da3d35, type: 3}
m_Resource: {fileID: 8300000, guid: de54536a55703434b8ad53b9a7da3d35, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &4185765918994780331
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 726335702565593345}
m_Layer: 0
m_Name: OceanPropsDropItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &726335702565593345
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4185765918994780331}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 816226554442943762}
- {fileID: 6499268732264954890}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7996128800962867104
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 816226554442943762}
- component: {fileID: 1871283123640341369}
m_Layer: 21
m_Name: DropItemController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &816226554442943762
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7996128800962867104}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726335702565593345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1871283123640341369
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7996128800962867104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e474579c3021c964cb86b13cbec28e89, type: 3}
m_Name:
m_EditorClassIdentifier:
spriteRenderer: {fileID: 0}
audioSource: {fileID: 8975262077732393561}
itemUiPrefab: {fileID: 3090447943159425444, guid: 0d213e978cd398441bcd61573163ca16,
type: 3}
pointingArrowUiPrefab: {fileID: 3183496459896387822, guid: 71ca57d34077f5d4492c5d47fb465d59,
type: 3}
arrowOffset: 10
useAutoDestroy: 0
autoDestroyTime: 30
drawGizmos: 1
radius: 15
acquisitionTime: 1.5
targetLayer:
serializedVersion: 2
m_Bits: 512

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0bb294b26cbcae54a8508211b077a88d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -162,7 +162,7 @@ MonoBehaviour:
centerOfMass: {x: 0, y: -0.5, z: 0}
combinedCenterOfMass: {x: 0, y: -0.5, z: 0}
useDefaultInertia: 1
inertiaTensor: {x: 188774.38, y: 0, z: 187856.39}
inertiaTensor: {x: 105004.21, y: 0, z: 104535.86}
combinedInertiaTensor: {x: 0, y: 0, z: 0}
--- !u!114 &867154244752756088
MonoBehaviour:
@ -438,11 +438,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9b69f7e57a6e2a641936534835f324ea, type: 3}
m_Name:
m_EditorClassIdentifier:
itemInfo:
<ItemName>k__BackingField: Coin
<ItemCount>k__BackingField: 50
<ItemIcon>k__BackingField: {fileID: 21300000, guid: 457ae4f0af7434f8aad6799ba5f881ba,
type: 3}
<DropItemTable>k__BackingField: {fileID: 11400000, guid: 05eadc282e9d88f4394eee3679190a71,
type: 2}
<Strength>k__BackingField: 50
power: 10
damageCooldown: 2

View File

@ -78,6 +78,33 @@ PrefabInstance:
propertyPath: m_Name
value: BigBarrel
objectReference: {fileID: 0}
- target: {fileID: 5205023087971492808, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: baseMass
value: 35925.93
objectReference: {fileID: 0}
- target: {fileID: 5205023087971492808, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: inertiaTensor.x
value: 566323.2
objectReference: {fileID: 0}
- target: {fileID: 5205023087971492808, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: inertiaTensor.z
value: 563569.3
objectReference: {fileID: 0}
- target: {fileID: 6133121076405265868, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: dropItemTable
value:
objectReference: {fileID: 11400000, guid: 0cbd0ef58813bb848a45b92be06ede0a,
type: 2}
- target: {fileID: 6133121076405265868, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: <DropItemTable>k__BackingField
value:
objectReference: {fileID: 11400000, guid: 0cbd0ef58813bb848a45b92be06ede0a,
type: 2}
- target: {fileID: 6133121076405265868, guid: e1e9d8e539bb53c4baa0bfd2ca4113e6,
type: 3}
propertyPath: itemInfo.<ItemCount>k__BackingField

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b1d738c46034bc244bd356692577373c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 2d6d5d59d45ce8a4784ba6c47984a23e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 560a88da2bbc70140bed167f0ba7fe37
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: fb01be13d6e88ca488dda82150319bfc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 117dcc671050f5247bd8743b91ecaab7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4d9b575363cdb56408d92f7d7f0e5216
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 171c5051d845c4545a6679cdcb9e8290
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e381f1e638a8aec4dbd9a7be673b56e2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 01db744855bbae74481522d48fd63008
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e5f625ae60b99fe4ab78d44cfb58ce5a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b606e558541a7b14593ea370c1a31da1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: c13a7e89fcc1f5544b4debda9d682854
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9d6eeb26838ae2140a98c7b012c07610
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 46615cbdbe482664aaf8d3fe2af274c8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 92b78aa6c7b02924c907a69383e7722f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 169dbd692ce7b8a4083e3e77421ce8d0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ab41e3ef05cb5ef44a38c3a33b6715eb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9a785472f49cbc0419f4e80050360f8a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: acc7135a62c70bb40bfd196dcc0dbf58
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 43b92591c923d1543bc95a9b89918a6c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4c1d290c89eb9a146a0c3fc3c5d97639
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More