public override void Process(ref ClockComponent clock)
 {
     clock.HandSpeed += Mathf.Log(clock.HandSpeed);
     level           += 1;
     cost             = 100 * Mathf.Pow(1.47F, level);
     BonusSpeed       = clock.HandSpeed % BaseSpeed;
     button.GetComponentInChildren <Text>().text = name + Mathf.Round(cost).ToString(CultureInfo.InvariantCulture);
 }
Exemple #2
0
        public void Run()
        {
            if (_filter.IsEmpty())
            {
                return;
            }
            int   count           = 0;
            float truScoreCurrent = 0;

            foreach (var index in _filter)
            {
                count++;
                ref ClockComponent clock = ref _filter.Get1(index);
                truScoreCurrent += clock.ScorePerSecond * clock.HandSpeed / 6f;
                var scoreDiff = clock.ScorePerSecond * clock.HandSpeed / 6f * Time.deltaTime;
                _gameState.Score += scoreDiff;
            }
        public void Run()
        {
            foreach (var index in _filter)
            {
                ref ClockComponent clock = ref _filter.Get1(index);
                var handTransform        = clock.HandTransform;
                var angles = handTransform.localEulerAngles;

                if (clock.CurrentAngle <= 0)
                {
                    clock.CurrentAngle        = 0f;
                    angles.z                  = 0f;
                    handTransform.eulerAngles = angles;
                }
                else if (clock.CurrentAngle > 0f)
                {
                    var angleDiff = clock.HandSpeed * Time.deltaTime;
                    handTransform.Rotate(Vector3.forward * -angleDiff);
                    clock.CurrentAngle -= angleDiff;
                    _filter.GetEntity(index).Get <UpdateScoreEvent>() = new UpdateScoreEvent();
                }
            }
 public override void Process(ref ClockComponent clock)
 {
     clock.ScorePerSecond += level * 0.25f;
     level += 1;
     cost  += cost * 0.02f;
 }
 public void Run()
 {
     foreach (var index in _filter)
     {
         ref ClockComponent   clock       = ref _filter.Get1(index);
         ref ClockReloadEvent reloadEvent = ref _filter.Get2(index);