Beispiel #1
0
    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);
            }
        }
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    public void GoToCar()
    {
        car.tag      = "Player";
        car.isActive = true;

        TCKInput.SetControllerEnable("getcarBtn", false);
        TCKInput.SetControllerEnable("leavecarBtn", true);


        speedcanv.alpha = 1;
        characher.SetActive(false);
    }