示例#1
0
    private void OnTriggerStay(Collider other)
    {
        timer = 3;

        if (other.gameObject.CompareTag("Train"))
        {
            tipArea.SetActive(true);

            tip = tipRequired.enter;
        }

        if (gameObject.GetComponent <playerMovementScript>().train.GetComponentInChildren <trainRideScript>().ridingTrain)
        {
            tipArea.SetActive(true);

            tip = tipRequired.exit;
        }
    }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        // Am I interacting with an Item?
        if (other.gameObject.CompareTag("Item"))
        {
            tipArea.SetActive(true);

            tip = tipRequired.pickup;
        }

        // Am I interacting with the carriage?
        if (other.gameObject.CompareTag("Carriage") && gameObject.GetComponent <playerMovementScript>().itemHeld)
        {
            tipArea.SetActive(true);

            tip = tipRequired.deposit;
        }

        timer = 3;
    }