+ Layer Boids, Boid로 분리 + Fish의 로직을 Boids(군집) 알고리즘으로 변경 + 군집에 이펙트를 통해 낚시 가시성 추가 + 테스트용 군집 애니메이션 추가 + Epic Toon EX 에셋의 스크립트 수정 버전 ㄴ ParticleWeapon(Layer 선택, UnityEvent Hit 델리게이트 기능 추가) 사용 + Cannon의 x축 회전 고정 + Cannon이 공격한 Layer에 따른 기능 변경 + DataManager에 PlayerInventory 추가 ㄴ 초창기에 사용한 코딩 삭제 + 초창기에 사용했던 스크립트들 일부 정리
57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace BlueWaterProject
|
|
{
|
|
public class DataManager : Singleton<DataManager>
|
|
{
|
|
[field: Title("Inventory")]
|
|
[field: SerializeField] public PlayerInventory PlayerInventory { get; private set; }
|
|
|
|
[Title("DataBase", "GameObject")]
|
|
public GameObject mouseSpot;
|
|
public GameObject boat;
|
|
public GameObject assaultCard;
|
|
public GameObject radarTargetUi;
|
|
public GameObject vomit;
|
|
|
|
[Title("DataBase", "Particle")]
|
|
public GameObject nukeFire;
|
|
public GameObject grenadeFire;
|
|
public GameObject emojiHeart;
|
|
public GameObject emojiPuke;
|
|
public GameObject emojiAnger;
|
|
|
|
[Title("DataBase", "Sprites")]
|
|
public Sprite[] cardType;
|
|
public Texture2D cursorTexture;
|
|
public Sprite enemyMarker;
|
|
|
|
private void Init()
|
|
{
|
|
PlayerInventory = new PlayerInventory();
|
|
}
|
|
|
|
protected override void OnAwake()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Dictionary 초기화 함수
|
|
/// </summary>
|
|
private Dictionary<string, T> CreateDictionaryFromList<T>(List<T> list, int capacity) where T : IIdx
|
|
{
|
|
var newDictionary = new Dictionary<string, T>(capacity);
|
|
|
|
foreach (var item in list)
|
|
{
|
|
newDictionary.Add(item.Idx, item);
|
|
}
|
|
|
|
return newDictionary;
|
|
}
|
|
}
|
|
} |