void Update() { if (TCKInput.GetAction("leavecarBtn", EActionEvent.Down)) { LeaveCar(); } if (TCKInput.GetAction("getcarBtn", EActionEvent.Down)) { GoToCar(); } if (characher.activeSelf) { car = FindCar(); if (car != null && profile.Cars.Contains(car)) { TCKInput.SetControllerEnable("getcarBtn", true); } else { TCKInput.SetControllerEnable("getcarBtn", false); } } }
public void LeaveCar() { TCKInput.SetControllerEnable("getcarBtn", true); TCKInput.SetControllerEnable("leavecarBtn", false); car.isActive = false; car.tag = "Untagged"; characher.transform.position = car.transform.position; speedcanv.alpha = 0; characher.SetActive(true); }
public void GoToCar() { car.tag = "Player"; car.isActive = true; TCKInput.SetControllerEnable("getcarBtn", false); TCKInput.SetControllerEnable("leavecarBtn", true); speedcanv.alpha = 1; characher.SetActive(false); }