void invertGoUp(ThiefCar target) { if (target.getGoUp()) { target.setGoUp(false); rotateInverse(target.gameObject.transform.GetChild(0).gameObject, 180); } else { target.setGoUp(true); rotateInverse(target.gameObject.transform.GetChild(0).gameObject, 0); } target.setVertical(true); }
void Start() { thief = player.GetComponent <ThiefCar>(); police = enemy.GetComponent <ThiefCar>(); }