Ejemplo n.º 1
0
        private void OnUseStartVoid(
            object sender,
            ObjectInteraction.InteractableObjectEventArgs interactableObjectEventArgs)
        {
            if (Settings.Instance().Multiplayer)
            {
                ChangeOwner();
                ObjectController.photonView.RPC("OnUseStartRpc", PhotonTargets.All);
            }
            else
            {
                UsingContext context = new UsingContext {
                    GameObject = Vio.GetUsingObject(), Hand = interactableObjectEventArgs.Hand
                };

                foreach (IUseStartAware useStartAware in _useStartList)
                {
                    useStartAware?.OnUseStart(context);
                }
            }
        }