npc animtion processing

This commit is contained in:
VDH
2025-09-27 17:10:53 +07:00
parent 7640efa9d7
commit 586e2f834b
25 changed files with 592 additions and 113 deletions
+12 -7
View File
@@ -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)
-1
View File
@@ -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;
}