private void UpdatePositionStatus(bool dueToResurrection)
        {
            string stateTextureName = "";

            if (Leading)
            {
                stateTextureName = Leading_Texture_Name;
            }
            else if (Trailing)
            {
                stateTextureName = Falling_Back_Texture_Name;
                if (!dueToResurrection)
                {
                    int timeDifference = ((LastCheckpointIndex < 0) ? LapTimeDifference : SectionTimeDifference);
                    if (timeDifference < 0)
                    {
                        stateTextureName = Catching_Up_Texture_Name;
                    }
                }
            }

            if (!string.IsNullOrEmpty(stateTextureName))
            {
                StatusPopup.StartPopupForRaceInfo(stateTextureName);
            }
        }
Example #2
0
    // Use this for initialization
    void Start()
    {
        camMaster      = FindObjectOfType <CameraMaster>();
        bCam           = FindObjectOfType <BodyCam>();
        ted            = FindObjectOfType <Teddy>();
        rightEye       = FindObjectOfType <TeddyRightEye>();
        fearMeter      = FindObjectOfType <Fear>();
        tedDoorInside  = tedDoorTrigInside.GetComponent <AutoDoor>();
        tedDoorOutside = tedDoorTrigOutside.GetComponent <AutoDoor>();
        anim           = tedDoorToAnimate.GetComponent <Animator>();
        animDup        = tedDoorToAnimateDup.GetComponent <Animator>();
        doorCollider   = tedDoorToAnimate.GetComponent <Collider>();
        statusWindow   = FindObjectOfType <StatusPopup>();

        doorOpen       = false;
        tedInsideOrOut = false;

        wholeDoorTransportFromLocation = wholeDoorSetup.position;
        tedTransportFromLocation       = ted.transform.position;
        rightEyeTransportFromLocation  = rightEye.transform.position;
    }
 // Start is called before the first frame update
 void Start()
 {
     statusMsg = FindObjectOfType <StatusPopup>();
 }