public override void Interact(PlayerInteractionController interactionController) { if (IsLocked == true) { DeInteract(interactionController); interactionController.DeinteractWithCurrentObject(); } if (interactionController.currentlyWielding?.toolID != required_ToolID) { notool_Animator.transform.root.position = transform.position + object_ui_Offset; Set_Notifications(); interactionController.DeinteractWithCurrentObject(); } if (interactionController.currentlyWielding != null) { if (required_ToolID == interactionController.currentlyWielding.toolID) { noteTimer = 0; base.Interact(interactionController); return; } } }
public override void Interact(PlayerInteractionController interactionController) { interactionController.DeinteractWithCurrentObject(); if (IsLocked == false) { if (lockedForOthers == false) { lockedForOthers = true; Set_LockingState(true); Set_OnSetEnableStateCollider(false); photonView.TransferOwnership(PhotonNetwork.LocalPlayer); } if (interactionController.currentlyWielding != null) { if (interactionController.currentlyWielding != this) { interactionController.DropObject(interactionController.currentlyWielding); } } interactionController.PickupObject(this, pickup_Offset, rotation_Offset); } }
public override void Interact(PlayerInteractionController interactionController) { if (IsLocked) { interactionController.DeinteractWithCurrentObject(); return; } if (lockedForOthers == false) { lockedForOthers = true; Set_LockingState(true); photonView.TransferOwnership(PhotonNetwork.LocalPlayer); } if (IsCleaned == false) { CleaningProgression += Time.deltaTime; OnStartInteraction(); if (progressBar.enabled == false) { Set_ProgressBarEnableState(true); } progressBar.Set_CurrentProgress(CleaningProgression / cleaningTime); progressBar.Set_LocalPositionOfPrefabRootTransform(transform, object_ui_Offset); if (CleaningProgression >= cleaningTime) { passedFirstFrame = false; ServiceLocator.GetServiceOfType <EffectsManager>().StopAudioMultiplayer(interactionSoundNumber); progressBar.Set_BarToFinished(); OnCleanedObject(interactionController); interactionController.DeinteractWithCurrentObject(); } } }
public override void Interact(PlayerInteractionController interactionController) { if (IsLocked == true) { DeInteract(interactionController); interactionController.DeinteractWithCurrentObject(); } if (IsBroken == true) { if (interactionController.currentlyWielding != null) { if (interactionController.currentlyWielding.toolID == repair_ToolID) { OnStartInteraction(); if (lockedForOthers == false) { lockedForOthers = true; Set_LockingState(true); photonView.TransferOwnership(PhotonNetwork.LocalPlayer); } RepairProgression += Time.deltaTime; if (repairProgressionUI.enabled == false) { Set_RepairProgressbarEnableState(true); } repairProgressionUI.Set_CurrentProgress(RepairProgression / repairTime); if (RepairProgression >= repairTime) { passedFirstFrame = false; ServiceLocator.GetServiceOfType <EffectsManager>().StopAudioMultiplayer(interactionSoundNumber); RepairObject(); Set_BreakableProgressbarFinish(); } return; } } notool_Animator.transform.root.position = transform.position + object_ui_Offset; Set_Notifications(); return; } base.Interact(interactionController); }
public override void DeInteract(PlayerInteractionController interactionController) { IsLocked = false; passedFirstFrame = false; CleaningProgression = 0; ServiceLocator.GetServiceOfType <EffectsManager>().StopAudioMultiplayer(interactionSoundNumber); if (progressBar.enabled == true) { Set_ProgressBarEnableState(false); } if (lockedForOthers == true) { lockedForOthers = false; Set_LockingState(false); } progressBar.Set_CurrentProgress(0); interactionController.DeinteractWithCurrentObject(); ServiceLocator.GetServiceOfType <EffectsManager>().StopAudio(interactionSoundNumber, EffectsManager.SyncMode.Multiplayer); }
public override void DeInteract(PlayerInteractionController interactionController) { interactionController.DeinteractWithCurrentObject(); }