Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);
        }
    }
Ejemplo n.º 3
0
    //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);
        }
    }