Пример #1
0
        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);
        }
Пример #2
0
        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;
        }
Пример #3
0
        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();
        }
Пример #4
0
 public void Awake()
 {
     mWindModel = new TrigWaveGenerator(Core.Common.TimeScale.Scaled, true);
 }
Пример #5
0
 public void Awake()
 {
     mHost        = GetComponent <Transform>();
     mWavePattern = new TrigWaveGenerator(TimeScale.Scaled);
     ResetState();
 }