npc animtion processing
This commit is contained in:
@@ -4,19 +4,21 @@ using System.Data;
|
||||
using Unity.Cinemachine;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class GameController : MonoBehaviour
|
||||
{
|
||||
private static GameController instance;
|
||||
|
||||
[SerializeField] private CECHostPlayer characterPrefab;
|
||||
[SerializeField] private CECMonster monsterPrefab;
|
||||
[SerializeField] private CinemachineCamera cinemachineCamera;
|
||||
//[SerializeField] private Transform ground;
|
||||
CECHostPlayer hostPlayer;
|
||||
|
||||
public static GameController Instance
|
||||
{
|
||||
get
|
||||
public static GameController Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
@@ -27,7 +29,7 @@ public class GameController : MonoBehaviour
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
@@ -39,7 +41,7 @@ public class GameController : MonoBehaviour
|
||||
}
|
||||
public CECHostPlayer GetHostPlayer()
|
||||
{
|
||||
if(hostPlayer == null)
|
||||
if (hostPlayer == null)
|
||||
{
|
||||
hostPlayer = FindAnyObjectByType<CECHostPlayer>();
|
||||
}
|
||||
@@ -48,7 +50,7 @@ public class GameController : MonoBehaviour
|
||||
}
|
||||
public void InitCharacter(cmd_self_info_1 info)
|
||||
{
|
||||
if(characterPrefab == null)
|
||||
if (characterPrefab == null)
|
||||
{
|
||||
Debug.LogError("null prefab");
|
||||
return;
|
||||
@@ -66,7 +68,10 @@ public class GameController : MonoBehaviour
|
||||
//posGround.y -= 2f;
|
||||
//ground.transform.position = posGround;
|
||||
}
|
||||
|
||||
public CECMonster GetMonster()
|
||||
{
|
||||
return Instantiate(monsterPrefab, transform);
|
||||
}
|
||||
public GameObject InitCharacter(info_player_1 info)
|
||||
{
|
||||
if (characterPrefab == null)
|
||||
|
||||
@@ -121,7 +121,6 @@ public abstract class EC_Player : MonoBehaviour
|
||||
PLAYER_ACTION action = actionConfig;
|
||||
|
||||
var szAct = EC_Utility.BuildActionName(action, 0);
|
||||
BrewMonster.Logger.Log("HoangDev szActszAct: " + szAct);
|
||||
EventBus.PublishChannel(m_PlayerInfo.cid, new PlayActionEvent(szAct));
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user