public void Awake() { this.mWaveFunction = new TrigWaveGenerator(Common.TimeScale.Scaled, true); var startTimePosition = this.RandomStartCyclePosition ? Random.Range(0f, 0.99f) : 0f; this.mWaveFunction.Start(TrigWaveGenerator.WaveType.Sine, this.CycleTime, 0f, 360f, startTimePosition); }
public void ResetState() { mWavePattern = new TrigWaveGenerator(TimeScale.Scaled); float signX = this.transform.localScale.x >= 0f ? 1f : -1f; float signY = this.transform.localScale.x >= 0f ? 1f : -1f; mBaseScale = this.transform.localScale; mSignX = signX; mSignY = signY; }
private void Start() { if (this.FloatingRange.x < 0f || this.FloatingRange.y < 0f) { throw new ArgumentOutOfRangeException("Floating Range cannot be negative"); } if (this.FloatingDuration.x < 0f || this.FloatingDuration.y < 0f) { throw new ArgumentOutOfRangeException("Floating Duration cannot be negative"); } mXTimer = new TrigWaveGenerator(Common.TimeScale.Scaled); mYTimer = new TrigWaveGenerator(Common.TimeScale.Scaled); mXState = false; mYState = false; mHasHost = this.FollowHost != null; StartXTimer(); StartYTimer(); }
public void Awake() { mWindModel = new TrigWaveGenerator(Core.Common.TimeScale.Scaled, true); }
public void Awake() { mHost = GetComponent <Transform>(); mWavePattern = new TrigWaveGenerator(TimeScale.Scaled); ResetState(); }