void Update() { if (active) { AxisChange?.Invoke(GetValue()); } }
// Use this for initialization void Start() { axis = new AxisChange("Fire1"); cancellationTokenSource = new CancellationTokenSource(); buttonOnce = false; GameSystemData.Instance.Score.Value = 0; }
void Start() { particle = particleObject.GetComponent <ParticleSystem>(); soundEffect = soundEffectObj.GetComponent <SoundEffect>(); fireAxis = new AxisChange("Fire1"); mainCamera = mainCameraObj.GetComponent <Camera>(); fishOptions = new List <FishOption>(); }
async void Start() { fireAxis = new AxisChange("Fire1"); cancellationTokenSource = new CancellationTokenSource(); var context = SynchronizationContext.Current; var token = cancellationTokenSource.Token; try { await AwaitHelper.Delay(21f, token); SceneManager.LoadScene("TitleScene"); } catch (TaskCanceledException) { } }