public static UIInteractMessage Send(GameObject subject, string hand) { UIInteractMessage msg = new UIInteractMessage { Subject = subject.GetComponent <NetworkIdentity>().netId, Hand = encodeHand(hand) }; msg.Send(); // InputTrigger.msgCache[msg.Subject] = Time.time; return(msg); }
public override void UI_Interact(GameObject originator, string hand) { base.UI_Interact(originator, hand); if (!isServer) { UIInteractMessage.Send(gameObject, UIManager.Hands.CurrentSlot.eventName); } else { startBuilding(originator, originator.transform.position); } }
//For openning/closing fire extinguisher public override void UI_Interact(GameObject originator, string hand) { base.UI_Interact(originator, hand); if (!isServer) { UIInteractMessage.Send(gameObject, UIManager.Hands.CurrentSlot.eventName); } else { //Toggle the extinguisher: extinguisher.ToggleExtinguisher(originator); } }