Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,765 changes: 591 additions & 3,174 deletions Assets/Fonts/NotoSansJP-Black SDF.asset

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Assets/Prefabs/PCPlayer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d29aa7d5ed7124b52812c2e12576fece, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerMove
moveSpeed: 20
moveSpeed: 10
gravity: 6
jumpSpeed: 12
planetCenter: {fileID: 5110394550287685901, guid: 6efab54670793466cb5125952d5cd355, type: 3}
Expand Down
14 changes: 7 additions & 7 deletions Assets/Scenes/ForPCMainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::BgmManager
audioSource: {fileID: 409163069}
waitingBgm: {fileID: 8300000, guid: accd4c490ac46475d875b6a6737c3050, type: 3}
battleBgm: {fileID: 8300000, guid: 2d7e1b2e12b8a4cc1968cb60fd6ce8ac, type: 3}
waitingBgm: {fileID: 0}
battleBgm: {fileID: 0}
--- !u!82 &409163069
AudioSource:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2095,8 +2095,8 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::HealthItemSpawner
healthItemPrefab:
RawGuidValue: b5a26f89cc7544331ba5909bd6973c24
healAmount: 20
respawnDelay: 10
healAmount: 5
respawnDelay: 60
spawnPointsRoot: {fileID: 1968169495}
spawnPoints: []
shuffleSpawnPointsOnRoundStart: 1
Expand Down Expand Up @@ -6714,7 +6714,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 306900148}
m_HandleRect: {fileID: 306900147}
m_Direction: 0
m_Value: 0
m_Value: 1
m_Size: 0.999971
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down Expand Up @@ -8158,7 +8158,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.006299452, y: 0.0036063686}
m_AnchoredPosition: {x: -0.014243502, y: -0.0030303588}
m_SizeDelta: {x: -183, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2107111657
Expand Down Expand Up @@ -8283,7 +8283,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 587169065}
m_HandleRect: {fileID: 587169064}
m_Direction: 2
m_Value: 0
m_Value: 1
m_Size: 0.9999933
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down
8 changes: 8 additions & 0 deletions Assets/Scripts/Player/Health.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions Assets/Scripts/Player/Health/PlayerBodyScaleController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using UnityEngine;

public sealed class PlayerBodyScaleController
{
private readonly GameObject visualRoot;
private readonly CharacterController characterController;

private Vector3 originalVisualRootScale = Vector3.one;
private bool hasOriginalVisualRootScale;

private float originalCharacterControllerHeight;
private float originalCharacterControllerRadius;
private Vector3 originalCharacterControllerCenter;
private bool hasOriginalCharacterControllerValues;

public PlayerBodyScaleController(
GameObject visualRoot,
CharacterController characterController
)
{
this.visualRoot = visualRoot;
this.characterController = characterController;

CaptureInitialValues();
}

public void SetBodySizeMultiplier(float multiplier)
{
multiplier = Mathf.Clamp(multiplier, 0.2f, 2.0f);

if (visualRoot != null && hasOriginalVisualRootScale)
{
visualRoot.transform.localScale = originalVisualRootScale * multiplier;
}

if (characterController != null && hasOriginalCharacterControllerValues)
{
characterController.height = originalCharacterControllerHeight * multiplier;
characterController.radius = originalCharacterControllerRadius * multiplier;
characterController.center = originalCharacterControllerCenter * multiplier;
}
}

private void CaptureInitialValues()
{
if (visualRoot != null)
{
originalVisualRootScale = visualRoot.transform.localScale;
hasOriginalVisualRootScale = true;
}

if (characterController != null)
{
originalCharacterControllerHeight = characterController.height;
originalCharacterControllerRadius = characterController.radius;
originalCharacterControllerCenter = characterController.center;
hasOriginalCharacterControllerValues = true;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading