コード例 #1
0
 public void OnSkillActivatedAuthority()
 {
     if (IsOnBeat() && beatNotPressedYet)
     {
         combo++;
         body.statsDirty   = true;
         beatNotPressedYet = false;
         Util.PlayAttackSpeedSound(hitSoundString, gameObject, 1f + 0.1f * (combo - 1f));
         MysticsItemsRhythmHUD.OnComboForInstance(this);
     }
 }
コード例 #2
0
            public void Update()
            {
                var wasInBeatWindow = currentTime <= beatWindowLate;

                currentTime += Time.deltaTime;

                if (body.hasEffectiveAuthority && wasInBeatWindow && currentTime > beatWindowLate)
                {
                    if (beatNotPressedYet)
                    {
                        if (combo > 0)
                        {
                            combo           = 0;
                            body.statsDirty = true;
                            MysticsItemsRhythmHUD.OnComboBreakForInstance(this);
                        }
                    }
                    beatNotPressedYet = true;
                }

                if (!readStarted && currentTime > (interval - readTime))
                {
                    readStarted = true;
                    MysticsItemsRhythmHUD.OnBeginReadForInstance(this);
                }

                if (currentTime >= interval)
                {
                    currentTime -= interval;
                    readStarted  = false;
                    preparePhase = Mathf.FloorToInt(interval);
                    Beat();
                }
                else
                {
                    if (beatNotPressedYet)
                    {
                        var newPreparePhase = Mathf.FloorToInt((interval - currentTime) / prepareTickInterval);
                        if (newPreparePhase < preparePhase)
                        {
                            preparePhase = newPreparePhase;
                            if (preparePhase <= (prepareTicks - 1))
                            {
                                if (body.hasEffectiveAuthority)
                                {
                                    Util.PlayAttackSpeedSound(prepareSoundString, gameObject, 1f + 0.1f * (combo - 1f));
                                }
                            }
                        }
                    }
                }
            }
コード例 #3
0
 public void Start()
 {
     MysticsItemsRhythmHUD.RefreshAll();
     currentTime = interval - 8f;
 }
コード例 #4
0
 private void HUD_onHudTargetChangedGlobal(HUD obj)
 {
     MysticsItemsRhythmHUD.RefreshForHUDInstance(obj);
 }