protected override void Awake() { base.Awake(); mesh = GetComponent <MeshRenderer>(); playerStats = player.GetComponent <PlayerStats>(); miscDisplay = FindObjectOfType <MiscDisplay>(); doorController = GetComponent <DoorController>(); }
private void Start() { doorTransform = GetComponentInChildren <MeshRenderer>().gameObject.transform; playerStats = GameObject.Find("Player").GetComponent <PlayerStats>(); miscDisp = GameObject.Find("MiscDisplay").GetComponent <MiscDisplay>(); locked = (LarcenyReq > 0); if (doorTransform) { defaultDoorPosition = doorTransform.transform.localPosition; } }