public override void Start() { Context.Get <ColorPaletteSystem>().UpdateFog(20); fader = GameObject.FindObjectOfType <FaderElement>(); topDownCamera = GameObject.FindGameObjectWithTag("TopDownCamera").GetComponent <Camera>(); topDownCamera.enabled = true; generator = GameObject.FindObjectOfType <GrailMapGenerator>(); generator.Build(); GrailElement grailInstance = Instantiate(grailPrefab, generator.GetRandomPosition(), Quaternion.identity); fader.Out(() => { if (handle != null) { handle.Dispose(); } handle = Observable.Timer(TimeSpan.FromSeconds(examineDuration)).Subscribe((xs) => { Change <SeekState>().Setup(grailInstance); }); }); }
public void Setup(GrailElement grail) { this.grail = grail; }