Skip to content

Commit 2aba579

Browse files
committed
add scale option
1 parent 6ded4c2 commit 2aba579

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

PracticeModManager.cs

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class PracticeModManager : MonoBehaviour
2222
public Camera playerCamera;
2323
public Text playerText;
2424

25+
2526
Vector3 storedPosition;
2627
Quaternion storedRotation;
2728
float storedScale;
@@ -31,6 +32,7 @@ class PracticeModManager : MonoBehaviour
3132
bool unlimitedRenderDistance;
3233
bool debugFunctions;
3334

35+
3436
void Awake()
3537
{
3638
PracticeModManager.Instance = this;
@@ -48,17 +50,19 @@ void Awake()
4850

4951
}
5052

53+
54+
55+
5156
void Update()
5257
{
5358

54-
55-
if (Input.GetKeyDown(KeyCode.K))
59+
60+
if (Input.GetKeyDown(KeyCode.K))
5661
{
5762
noClip = !noClip;
5863
noClipSpeed = 10.0f;
5964
}
6065

61-
6266
if (GameManager.GM.player == null)
6367
return;
6468

@@ -135,6 +139,29 @@ void Update()
135139
playerText.text = GetPlayerTextString();
136140
}
137141

142+
if (Input.GetKey(KeyCode.F1))
143+
{
144+
float newScale = playerMotor.transform.localScale.x + Time.deltaTime * playerMotor.transform.localScale.x;
145+
playerMotor.transform.localScale = new Vector3(newScale, newScale, newScale);
146+
GameManager.GM.player.GetComponent<PlayerResizer>().Poke();
147+
}
148+
149+
if (Input.GetKey(KeyCode.F2))
150+
{
151+
float newScale = playerMotor.transform.localScale.x - Time.deltaTime * playerMotor.transform.localScale.x;
152+
playerMotor.transform.localScale = new Vector3(newScale, newScale, newScale);
153+
GameManager.GM.player.GetComponent<PlayerResizer>().Poke();
154+
}
155+
156+
if (Input.GetKeyDown(KeyCode.F3))
157+
{
158+
playerMotor.transform.localScale = Vector3.one;
159+
GameManager.GM.player.GetComponent<PlayerResizer>().Poke();
160+
}
161+
162+
163+
164+
138165
if (Input.GetKeyDown(KeyCode.F4) && !noClip)
139166
unlimitedRenderDistance = !unlimitedRenderDistance;
140167

SuperliminalPracticeMod.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
<SpecificVersion>False</SpecificVersion>
5757
<HintPath>D:\Games\Superliminal\Superliminal_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
5858
</Reference>
59+
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
60+
<SpecificVersion>False</SpecificVersion>
61+
<HintPath>D:\Games\Superliminal\Superliminal_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
62+
</Reference>
5963
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
6064
<SpecificVersion>False</SpecificVersion>
6165
<HintPath>D:\Games\Superliminal\Superliminal_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>

0 commit comments

Comments
 (0)