mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-27 06:18:52 +00:00
BIG HEAD MODE
This commit is contained in:
parent
7ece9e92e5
commit
593656db36
@ -34,7 +34,11 @@ public class AnimationSync : PlayerSyncObject
|
||||
RequestInitialStatesMessage.SendInitialState += SendInitialState;
|
||||
}
|
||||
|
||||
protected void OnDestroy() => RequestInitialStatesMessage.SendInitialState -= SendInitialState;
|
||||
protected void OnDestroy()
|
||||
{
|
||||
RequestInitialStatesMessage.SendInitialState -= SendInitialState;
|
||||
GlobalMessenger.RemoveListener("EnableBigHeadMode", new Callback(OnEnableBigHeadMode));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This wipes the NetworkAnimator's fields, so it assumes the parameters have changed.
|
||||
@ -98,6 +102,8 @@ public class AnimationSync : PlayerSyncObject
|
||||
|
||||
Delay.RunWhen(() => Player.CameraBody != null,
|
||||
() => body.GetComponent<PlayerHeadRotationSync>().Init(Player.CameraBody.transform));
|
||||
|
||||
GlobalMessenger.AddListener("EnableBigHeadMode", new Callback(OnEnableBigHeadMode));
|
||||
}
|
||||
|
||||
private void InitAccelerationSync()
|
||||
@ -107,6 +113,12 @@ public class AnimationSync : PlayerSyncObject
|
||||
Player.JetpackAcceleration.Init(thrusterModel);
|
||||
}
|
||||
|
||||
private void OnEnableBigHeadMode()
|
||||
{
|
||||
var bone = GetComponent<Animator>().GetBoneTransform(HumanBodyBones.Head);
|
||||
bone.localScale = new Vector3(2.5f, 2.5f, 2.5f);
|
||||
}
|
||||
|
||||
public void SetSuitState(bool suitedUp)
|
||||
{
|
||||
if (!Player.IsReady)
|
||||
|
Loading…
Reference in New Issue
Block a user