Beispiel #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        ResetPlayer rp = collision.gameObject.GetComponent <ResetPlayer>();

        if (rp != null)
        {
            ResetPositon();
        }
    }
Beispiel #2
0
    public void DefineVariables()
    {
        resetPlayerScript         = gameObject.GetComponent <ResetPlayer>();
        resetPlayerScript.reseter = GameObject.FindGameObjectWithTag("Reset trigger").GetComponent <Collider>();

        if (levelLoaded.name == lastLevelName)
        {
            thanks4PlayingScript.enabled = true;
        }
    }
Beispiel #3
0
 private void Start()
 {
     resetPlayerScript = GetComponent <ResetPlayer>();
 }
 private void OnEnable()
 {
     player            = GameObject.FindGameObjectWithTag("Player");
     playerCollider    = player.GetComponent <Collider>();
     resetPlayerScript = player.GetComponent <ResetPlayer>();
 }