zwieter Pingu und Bär holt sich Reset Objekte
This commit is contained in:
@@ -12,13 +12,16 @@ public class BearIsAwake : MonoBehaviour
|
||||
private bool wakingUp = false;
|
||||
public BearAwareness bearAwareness;
|
||||
|
||||
public PositionReset penguinReset;
|
||||
public PositionReset iceBlockReset;
|
||||
public PositionReset[] thingstoReset;
|
||||
private void Start()
|
||||
{
|
||||
BearAwareness.HasWokenUp += IsAwake;
|
||||
|
||||
thingstoReset = FindObjectsOfType<PositionReset>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (wakingUp)
|
||||
@@ -49,8 +52,10 @@ public class BearIsAwake : MonoBehaviour
|
||||
if (hit.collider.name == "StandUpCollider")
|
||||
{
|
||||
Debug.Log("Your Dead!");
|
||||
penguinReset.Reset();
|
||||
iceBlockReset.Reset();
|
||||
foreach (PositionReset things in thingstoReset)
|
||||
{
|
||||
things.Reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user