private void Update() { if (Camera.main == null) { return; } if (inFOV(key.position)) { behaviour.SetPickUpTarget(key); } else { behaviour.GoIdle(); } }
private void Update() { if (Camera.main == null) { return; } StateManager stateManager = StateManager.Instance; // pick up key only when tutorial is done and player looks towards the key if (inFOV(key.position) && stateManager.TutorialDone() && behaviour.flyingSeasons.Contains(SeasonsManager.Instance.CurrentSeason)) { behaviour.SetPickUpTarget(key); } else { behaviour.GoIdle(); } }