mirror of
https://github.com/DerTyp7/industrialize-unity.git
synced 2025-10-30 12:57:11 +01:00
a
This commit is contained in:
@@ -17,9 +17,7 @@ public class PlayerController : MonoBehaviour
|
||||
// demolish
|
||||
if (Input.GetButtonDown("Demolish"))
|
||||
{
|
||||
Debug.Log("Demolish");
|
||||
demolishMode = !demolishMode;
|
||||
movingMode = false;
|
||||
ToggleDemolishMode();
|
||||
}
|
||||
|
||||
if (demolishMode && Input.GetMouseButton(0) && MenuManager.AllMenusClosed())
|
||||
@@ -31,9 +29,7 @@ public class PlayerController : MonoBehaviour
|
||||
// moving
|
||||
if (Input.GetButtonDown("Move"))
|
||||
{
|
||||
Debug.Log("Move");
|
||||
movingMode = !movingMode;
|
||||
demolishMode = false;
|
||||
ToggleMovingMode();
|
||||
}
|
||||
|
||||
if (movingMode && Input.GetMouseButtonDown(0) && MenuManager.AllMenusClosed())
|
||||
@@ -44,4 +40,18 @@ public class PlayerController : MonoBehaviour
|
||||
movingMode = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleDemolishMode()
|
||||
{
|
||||
Debug.Log("Demolish");
|
||||
demolishMode = !demolishMode;
|
||||
movingMode = false;
|
||||
}
|
||||
|
||||
public void ToggleMovingMode()
|
||||
{
|
||||
Debug.Log("Move");
|
||||
movingMode = !movingMode;
|
||||
demolishMode = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user