Skip to content

Commit

Permalink
Starting menu panel fix, up/down + push/pull fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoAnfu committed Jul 27, 2022
1 parent 5f58308 commit 39562f1
Show file tree
Hide file tree
Showing 299 changed files with 193 additions and 181 deletions.
8 changes: 4 additions & 4 deletions nuts&bolts/Assets/Scenes/Menu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -2682,7 +2682,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1372.0208, y: -417.4895}
m_AnchoredPosition: {x: -1372.0208, y: -317}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1195130969
Expand Down Expand Up @@ -3304,14 +3304,14 @@ RectTransform:
m_GameObject: {fileID: 1290520459}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
m_Children: []
m_Father: {fileID: 1156826483}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -3, y: 386}
m_AnchoredPosition: {x: -66, y: 386}
m_SizeDelta: {x: 2562, y: 1413.2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1290520461
Expand Down
8 changes: 4 additions & 4 deletions nuts&bolts/Assets/Scenes/Menu2.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -2594,7 +2594,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1372.0208, y: -417.4895}
m_AnchoredPosition: {x: -1372.0208, y: -317}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1195130969
Expand Down Expand Up @@ -3216,14 +3216,14 @@ RectTransform:
m_GameObject: {fileID: 1290520459}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
m_Children: []
m_Father: {fileID: 1156826483}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -3, y: 386}
m_AnchoredPosition: {x: -66, y: 386}
m_SizeDelta: {x: 2562, y: 1413.2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1290520461
Expand Down
14 changes: 13 additions & 1 deletion nuts&bolts/Assets/Script/Legs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ public enum LegPos { None, Up, Down }
public LegPos state = LegPos.None;
public static float upValue = 0.25f;
public static float dwValue = 0.5f;
public bool canPush = true;

bool doItOnce = true;
bool doItOnce = true;

Transform movePoint;
Transform legs;
Expand All @@ -38,6 +39,17 @@ void Update()
{
bool specialAction = GetComponent<PlayerLogic>().specialAction;

//FIX PUSHPULL BOXES
if (state != LegPos.None && GetComponent<RobotPowers>()._components.legs < 5)
{
canPush = false;
}
else
{
canPush = true;
}


if (specialAction)
{
if (!doItOnce) return;
Expand Down
2 changes: 1 addition & 1 deletion nuts&bolts/Assets/Script/PlayerLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void OnSpecialAction(InputAction.CallbackContext context)
Collider[] colls = Physics.OverlapSphere(transform.position + transform.forward, 0.3f);
foreach (var c in colls)
{
if (c.name.StartsWith("TallBox")) return true;
if (c.name.StartsWith("TallBox") && GetComponent<Legs>().canPush == true) return true;
}
return false;
}
Expand Down
Loading

0 comments on commit 39562f1

Please sign in to comment.