Exemplo n.º 1
0
 public OrderlyMoveAction(Transform pPosition, float pDistanceToStop = 0, float pDistanceWhenCloseEnough = 2)
 {
     Target                  = pPosition;
     DistanceToStop          = pDistanceToStop;
     DistanceWhenCloseEnough = pDistanceWhenCloseEnough;
     PatientStatusController = pPosition.GetComponent <PatientStatusController>();
     IsGoingToPatient        = PatientStatusController != null;
 }
 // Use this for initialization
 private void Start()
 {
     StatusCtrl  = GetComponent <PatientStatusController>();
     TutorialUI  = FindObjectOfType <TutorialUIController>();
     ToolCtrl    = FindObjectOfType <ToolController>();
     AilmentCtrl = GetComponent <AilmentController>();
     SpaceBarImg = Instantiate(TutorialUI.HoldSpaceImg, FindObjectOfType <Canvas>().transform);
     SpaceBarImg.SetActive(false);
 }
Exemplo n.º 3
0
 protected override void Initialize()
 {
     InstantiateScriptableObjects();
     LevelManager      = FindObjectOfType <LevelManager>();
     PointsUIManager   = FindObjectOfType <PointsUIManager>();
     PatientStatusCtrl = GetComponent <PatientStatusController>();
     AilmentUI         = GetComponent <AilmentUIController>();
     StartCoroutine(PlayOngoingParticles());
     AudioSrc       = GetComponents <AudioSource>()[1];
     IsActionActive = false;
 }
    // Use this for initialization
    private void Start()
    {
        ExitPoint            = GameObject.Find("Exit");
        PatientStatus        = GetComponent <PatientStatusController>();
        StretchersController = GetComponent <StretchersController>();
        NavMeshAgent         = GetComponent <NavMeshAgent>();
        AilmentController    = GetComponent <AilmentController>();

        if (BedManager.GetAvailableBeds().Any())
        {
            var bedScript = BedManager.GetAvailableBeds()[0];
            bedScript.IsReserved = true;
            TargetBed            = bedScript.gameObject;
            NavMeshAgent.SetDestination(TargetBed.transform.position);
        }
        else if (SlotManager.AvailableSlots().Any())
        {
            //SlotManager.AvailableSlots()[0];
            var slotScript = SlotManager.AvailableSlots()[0];
            slotScript.PatientWaiting = gameObject;
            NavMeshAgent.SetDestination(slotScript.transform.position);
        }
    }