// Start is called before the first frame update void Start() { bodyPartManager = FindObjectOfType <BodyPartManager>(); unlockTracker = FindObjectOfType <UnlockTracker>(); PopulateBodyPartsList(); PopulateOrgansList(); }
// Start is called before the first frame update void Start() { bodyPartManager = FindObjectOfType <BodyPartManager>(); clock = FindObjectOfType <Clock>(); timeElapsed = 0.0f; expiryTime = 60.0f * 30.0f; }
public void GenerateInjuries() { textLog = FindObjectOfType <TextLog>(); bodyPartManager = FindObjectOfType <BodyPartManager>(); unlockTracker = FindObjectOfType <UnlockTracker>(); gameSetupTracker = FindObjectOfType <GameSetupScenarioTracker>(); EasyInjuries(gameSetupTracker.easyInjuries); MediumInjuries(gameSetupTracker.mediumInjuries); HardInjuries(gameSetupTracker.hardInjuries); randomIndex = 0; randomNumbersReturned.Add(77777); try { if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene") { GameObject.FindObjectOfType <BodyPartSelectorManager>().ResetSelectors(); GameObject.FindObjectOfType <EmbeddedObjectSelectorManager>().ResetSelectors(); } } catch (System.Exception e) { Debug.LogError($"PhysicalInjuryGenertor: Error resetting selectors: {e}"); } }
// Use this for initialization void Start() { penguin = GetComponent <Penguin>(); bodyPartManager = GameObject.FindGameObjectWithTag("BodyPartManager").GetComponent <BodyPartManager>(); agent = GetComponent <NavMeshAgent>(); heightManager = GetComponent <HeightManager>(); }
// Use this for initialization void Start() { bodyPartManager = GameObject.FindGameObjectWithTag("BodyPartManager").GetComponent <BodyPartManager>(); anim = GetComponent <Animator>(); penguin = GetComponentInParent <Penguin>(); navManager = GetComponentInParent <NavManager>(); heightManager = GetComponentInParent <HeightManager>(); }
private void Awake() { manager = GetComponentInParent <BodyPartManager>(); if (manager == null) { Debug.Log(transform.root.name + " has a bodypart but not BodyPartManager. Disabling BodyPart..."); this.enabled = false; } }
// Start is called before the first frame update void Start() { if (!manuallyDisabled) { deathMonitor = FindObjectOfType <DeathMonitor>(); lifeMonitor = FindObjectOfType <LifeMonitor>(); bodyPartManager = FindObjectOfType <BodyPartManager>(); //Time.timeScale = globalTimeScalingFactor; isTimePassing = false; currentTime.text = "00:00:00"; clockTarget = 0.0f; timeElapsed = 0.0f; } }
public bool SafeToDischarge() { BodyPartManager bodyPartManager = FindObjectOfType <BodyPartManager>(); bool safe = true; //check there's an appropriate number of each organ and limb if (BodyPartCountCheck()) { safe = false; } //currently, all charms are set to expire after 30 minutes anyway, but best to check just in case: if (CharmCheck()) { safe = false; } if (EmbeddedObjectCheck()) { safe = false; } return(safe); }
public void Start() { bodyPartManager = FindObjectOfType <BodyPartManager>(); UpdateHeartConnections(); }
private void Awake() { Instance = this; }
// Start is called before the first frame update void Awake() { bodyPartManager = FindObjectOfType <BodyPartManager>(); }
// Start is called before the first frame update void Start() { hasPlayerWon = false; bodyPartManager = FindObjectOfType <BodyPartManager>(); }
// Use this for initialization void Start() { penguin = GetComponent <Penguin>(); bodyPartManager = GameObject.FindGameObjectWithTag("BodyPartManager").GetComponent <BodyPartManager>(); navManager = GetComponent <NavManager>(); }
// Start is called before the first frame update void Awake() { buttonActions = FindObjectOfType <ButtonActions>(); bodyPartManager = FindObjectOfType <BodyPartManager>(); }
public static void DeleteBodyPartProcess(BodyPart bodyPart) { //destroy all organs contained in the bodypart foreach (Organ organ in bodyPart.containedOrgans) { try { GameObject.FindObjectOfType <BodyPartManager>().bodyParts.Remove(organ); if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene") { GameObject.FindObjectOfType <BodyPartStatusManager>().RemoveStatus(organ); } } catch (System.Exception e) { Debug.LogError(e); } GameObject.Destroy(organ.gameObject); } //destroy all objects embedded in the bodypart foreach (EmbeddedObject embeddedObject in bodyPart.embeddedObjects) { GameObject.Destroy(embeddedObject.gameObject); } //remove bodypart from tracking try { bodyPart.SeverAllConnections(); GameObject.FindObjectOfType <BodyPartManager>().bodyParts.Remove(bodyPart); if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene") { GameObject.FindObjectOfType <BodyPartStatusManager>().RemoveStatus(bodyPart); } } catch (System.Exception e) { Debug.LogError(e); } if (bodyPart is Organ) { BodyPartManager x = GameObject.FindObjectOfType <BodyPartManager>(); GameObject.FindObjectOfType <BodyPartManager>().organs.Remove((Organ)bodyPart); } GameObject.Destroy(bodyPart.gameObject); try { if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene") { GameObject.FindObjectOfType <BodyPartSelectorManager>().ResetSelectors(); GameObject.FindObjectOfType <EmbeddedObjectSelectorManager>().ResetSelectors(); } } catch (System.Exception e) { Debug.LogError(e); } UpdateAllBodyPartHeartConnections(); MonoBehaviour.FindObjectOfType <ActionTracker>().surgery_destroyed += 1; }