mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 18:40:03 +00:00
i am a dumb
This commit is contained in:
parent
d0634df2e5
commit
ef18f207bf
@ -36,23 +36,27 @@ namespace QSB.ElevatorSync.WorldObjects
|
||||
|
||||
public void RemoteCall(bool isGoingUp)
|
||||
{
|
||||
if (AttachedObject._goingToTheEnd == isGoingUp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_elevatorTrigger.IsTrackingObject(Locator.GetPlayerDetector()))
|
||||
{
|
||||
SetDirection(isGoingUp);
|
||||
|
||||
AttachedObject._attachPoint.AttachPlayer();
|
||||
|
||||
if (Locator.GetPlayerSuit().IsWearingSuit() && Locator.GetPlayerSuit().IsTrainingSuit())
|
||||
{
|
||||
Locator.GetPlayerSuit().RemoveSuit();
|
||||
}
|
||||
|
||||
AttachedObject.StartLift();
|
||||
RemoteStartLift();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDirection(isGoingUp);
|
||||
AttachedObject.StartLift();
|
||||
RemoteStartLift();
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +67,16 @@ namespace QSB.ElevatorSync.WorldObjects
|
||||
AttachedObject._targetLocalPos = isGoingUp ? AttachedObject._endLocalPos : AttachedObject._startLocalPos;
|
||||
}
|
||||
|
||||
private void RemoteStartLift()
|
||||
{
|
||||
AttachedObject.enabled = true;
|
||||
AttachedObject._initLocalPos = AttachedObject.transform.localPosition;
|
||||
AttachedObject._initLiftTime = Time.time;
|
||||
AttachedObject._owAudioSourceOneShot.PlayOneShot(AudioType.TH_LiftActivate);
|
||||
AttachedObject._owAudioSourceLP.FadeIn(0.5f);
|
||||
AttachedObject._interactVolume.DisableInteraction();
|
||||
}
|
||||
|
||||
public override void DisplayLines()
|
||||
{
|
||||
var boxShape = (BoxShape)_elevatorTrigger._shape;
|
||||
|
Loading…
x
Reference in New Issue
Block a user