1. ExpBar를 UIBar 로 변경해서 UIButton과 같이 여러곳에서 공용으로 사용할 수 있게 변경 2. EventBus 를 만들어서 Button같이 자기 스스로 동작을 시작할 수 있는 오브젝트들 말고 수동적인 오브젝트들이 값을 받는 방식을 관리하게 설정 - PlayerController, UIManager, UIBar, EventBus를 연결함 3. Events 아래에 Player의 이벤트에 연관된 코드를 PlayerEvents 로 만들어서 관리함 - 경험치 전달 양식이 여기 존재 - 체력바나 마나바 같은 양식도 여기서 만들 예정
44 lines
873 B
C#
44 lines
873 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Define
|
|
{
|
|
static readonly Dictionary<string, string> PathtoObject = new ()
|
|
{
|
|
{"JoyStick", "Prefabs/UI/JoyStick"},
|
|
{"Button_Attack", "Prefabs/UI/Button"},
|
|
{"Button_Defence", "Prefabs/UI/Button"},
|
|
// {"ExpBar", "Prefabs/UI/ExpBar"}
|
|
{"ExpBar", "Prefabs/UI/Bar"}
|
|
};
|
|
public static string MapPath(string name) => PathtoObject.TryGetValue(name, out string path) ? path : string.Empty;
|
|
|
|
public enum Scene
|
|
{
|
|
Uknown,
|
|
Title,
|
|
Lobby,
|
|
Game,
|
|
}
|
|
|
|
public enum InputEvent
|
|
{
|
|
Down,
|
|
Up,
|
|
Press,
|
|
Click,
|
|
}
|
|
|
|
public enum CameraMode
|
|
{
|
|
QuarterView,
|
|
SideView,
|
|
TopView,
|
|
}
|
|
|
|
public enum EnemyType
|
|
{
|
|
Unknown,
|
|
Test
|
|
}
|
|
} |