void OnTriggerEnter2D(Collider2D other) { if (other.tag == "pikkukaveri") { ch.UpdateCheckpoints(this.gameObject); Changecolor(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { ch.UpdateCheckpoints(this.gameObject); { } } }
void OnTriggerStay(Collider col) { // Checks if the collision is happening between the checkpoint and the player game object if (input.Gameplay.Interact.triggered && col.gameObject.GetComponent <playerControl>() != null) { //triggerEntered = true; //Debug.Log("TRIGGER ENTERED: " + triggerEntered); //if (input.Gameplay.Interact.triggered) //{ ch.UpdateCheckpoints(this.gameObject); // Investigate this to see if there's a way in Update() to use this function with a keypress. // Check if it's possible to respawn enemies //} } }