UI health change fix bug
This commit is contained in:
@@ -624,12 +624,10 @@ public class CECHostPlayer : CECPlayer
|
||||
{
|
||||
Debug.LogWarning("[Inventory] PICKUP_ITEM: Invalid data length");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnMsgHstItemOperation(ECMSG Msg)
|
||||
{
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
@@ -902,6 +900,13 @@ public class CECHostPlayer : CECPlayer
|
||||
public void InitCharacter(cmd_self_info_1 role)
|
||||
{
|
||||
SetUpPlayer();
|
||||
controller = GetComponent<CharacterController>();
|
||||
if (!controller)
|
||||
{
|
||||
BMLogger.LogError("HostPlayer InitCharacter no CharacterController");
|
||||
}
|
||||
parentModel = transform.GetChild(0);
|
||||
txtName = parentModel.GetComponentInChildren<TextMeshProUGUI>();
|
||||
string roleName = Encoding.Unicode.GetString(UnityGameSession.Instance.GetRoleInfo().name.ByteArray);
|
||||
//if (role.name != null && role.name.ByteArray != null)
|
||||
//{
|
||||
@@ -919,7 +924,7 @@ public class CECHostPlayer : CECPlayer
|
||||
EventBus.Subscribe<JoystickPressEvent>(JoystickStartDrag);
|
||||
if (TryGetComponent<PlayerVisual>(out var visual))
|
||||
{
|
||||
visual.InitHostPlayerEventDoneHandler();
|
||||
visual.InitPlayerEventDoneHandler();
|
||||
}
|
||||
|
||||
m_aabb.Center = GPDataTypeHelper.g_vOrigin;
|
||||
@@ -1802,12 +1807,14 @@ public struct NPCINFO
|
||||
public string Name; // Movement properties
|
||||
public int CurrentHealth;
|
||||
public int MaxHealth; // Attacking properties
|
||||
public int IDNPC; // Attacking properties
|
||||
|
||||
public NPCINFO(string name, int currentHealth, int maxHealth)
|
||||
public NPCINFO(string name, int currentHealth, int maxHealth,int idnpc)
|
||||
{
|
||||
Name = name;
|
||||
CurrentHealth = currentHealth;
|
||||
MaxHealth = maxHealth;
|
||||
IDNPC = idnpc;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user