mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
updated example code
This commit is contained in:
parent
c06ea6b6c8
commit
626f084a87
@ -46,7 +46,7 @@ public class PlayerEquip : NetworkBehaviour
|
||||
[SyncVar(hook = nameof(OnChangeEquipment))]
|
||||
public EquippedItem equippedItem;
|
||||
|
||||
void OnChangeEquipment(EquippedItem newEquippedItem)
|
||||
void OnChangeEquipment(EquippedItem oldEquippedItem, EquippedItem newEquippedItem)
|
||||
{
|
||||
StartCoroutine(ChangeEquipment(newEquippedItem));
|
||||
}
|
||||
@ -166,7 +166,7 @@ public class SceneObject : NetworkBehaviour
|
||||
public GameObject boxPrefab;
|
||||
public GameObject cylinderPrefab;
|
||||
|
||||
void OnChangeEquipment(EquippedItem newEquippedItem)
|
||||
void OnChangeEquipment(EquippedItem oldEquippedItem, EquippedItem newEquippedItem)
|
||||
{
|
||||
StartCoroutine(ChangeEquipment(newEquippedItem));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user