public void Falling(Player_Movement player) { if (player.transform.localScale.x > 0) { player.transform.localScale = new Vector3(player.transform.localScale.x - Time.deltaTime * scale_speed, player.transform.localScale.y - Time.deltaTime * scale_speed, player.transform.localScale.z); player.transform.Rotate(0, 0, spin_speed); } else { Vector3 pos_torespawn = Find_bestRespawnPoint(player); int Nump = rope.NumPoints; if (player.name == "PlayerOne") { rope.get_points()[0].transform.position = pos_torespawn; player.transform.localScale = new Vector3(1, 1, 1); godMode_Hole1.Hit_verification("PlayerOne", player.transform.position, "Fall Damage"); playerone_falling = false; delay_tmp = 0; } else { rope.get_points()[Nump - 1].transform.position = pos_torespawn; player.transform.localScale = new Vector3(1.2f, 1.2f, 1); godMode_Hole2.Hit_verification("PlayerTwo", player.transform.position, "Fall Damage"); playertwo_falling = false; delay_tmp_two = 0; } Reset_Chain(); player.transform.rotation = Quaternion.Euler(0, 0, 0); playerone.Allow_Moving(); playertwo.Allow_Moving(); } }
public void Stop_AutoRuning() { if (autoruning) { autoruning = false; gameObject.transform.GetChild(1).GetComponent <BoxCollider2D>().enabled = true; playerone.Allow_Moving(); playertwo.Allow_Moving(); animator.SetBool("open", false); } }
void EndDialogue() { animator.SetBool("IsOpen", false); p1.Allow_Moving(); p2.Allow_Moving(); }