public override IEnumerator Process() { yield return(WaitFor(EquipmentObject, ItemNetID)); //Debug.Log( // $"Received EquipMsg: Index {Index} ItemID: {ItemNetID} EquipID: {EquipmentObject} ForceInit: {ForceInit} IsBody: {IsBodySprites}"); if (NetworkObjects[0] != null) { if (!IsBodySprites) { ClothingItem c = NetworkObjects[0].GetComponent <Equipment>().GetClothingItem((NamedSlot)Index); if (ItemNetID == NetId.Invalid) { if (!ForceInit) { c.SetReference(null); } } else { c.SetReference(NetworkObjects[1]); } if (ForceInit) { c.PushTexture(); } } else { ClothingItem c = NetworkObjects[0].GetComponent <PlayerSprites>().characterSprites[Index]; if (ItemNetID == NetId.Invalid) { if (!ForceInit) { c.SetReference(null); } } else { c.SetReference(NetworkObjects[1]); } if (ForceInit) { c.PushTexture(); } } } }
public override void Process(NetMessage msg) { LoadMultipleObjects(new uint[] { msg.EquipmentObject, msg.ItemNetID }); //Debug.Log( // $"Received EquipMsg: Index {Index} ItemID: {ItemNetID} EquipID: {EquipmentObject} ForceInit: {ForceInit} IsBody: {IsBodySprites}"); if (NetworkObjects[0] != null) { if (!msg.IsBodySprites) { ClothingItem c = NetworkObjects[0].GetComponent <Equipment>().GetClothingItem((NamedSlot)msg.Index); if (msg.ItemNetID == NetId.Invalid) { if (!msg.ForceInit) { c.SetReference(null); } } else { c.SetReference(NetworkObjects[1]); } if (msg.ForceInit) { c.PushTexture(); } } else { ClothingItem c = NetworkObjects[0].GetComponent <PlayerSprites>().characterSprites[msg.Index]; if (msg.ItemNetID == NetId.Invalid) { if (!msg.ForceInit) { c.SetReference(null); } } else { c.SetReference(NetworkObjects[1]); } if (msg.ForceInit) { c.PushTexture(); } } } }