Added new Scenes and gave em an order
This commit is contained in:
@@ -11,8 +11,9 @@ public GameObject movingPoint;
|
||||
public Vector3 activatedPointPosition;
|
||||
private Vector3 originalPointPosition;
|
||||
public bool einsAn = false;
|
||||
public bool zweiAn = false;
|
||||
public bool dreiAn = false;
|
||||
public GameObject _LevelManager1;
|
||||
private keyWhenPressed script1;
|
||||
bool isActivated;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@@ -23,6 +24,11 @@ public bool dreiAn = false;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
script1 = _LevelManager1.GetComponent<keyWhenPressed>();
|
||||
isActivated = script1.isActivated;
|
||||
if (isActivated){
|
||||
spriteRenderer.sprite = activatedSprite;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +44,8 @@ void OnTriggerExit2D(Collider2D other) {
|
||||
if (other.CompareTag("PressurePlatable")|| other.CompareTag("PlayerIsOnIt")) {
|
||||
spriteRenderer.sprite = originalSprite;
|
||||
movingPoint.transform.position = originalPointPosition;
|
||||
einsAn = false;
|
||||
einsAn = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user