public void OnSkillActivatedAuthority() { if (IsOnBeat() && beatNotPressedYet) { combo++; body.statsDirty = true; beatNotPressedYet = false; Util.PlayAttackSpeedSound(hitSoundString, gameObject, 1f + 0.1f * (combo - 1f)); MysticsItemsRhythmHUD.OnComboForInstance(this); } }
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)); } } } } } }
public void Start() { MysticsItemsRhythmHUD.RefreshAll(); currentTime = interval - 8f; }
private void HUD_onHudTargetChangedGlobal(HUD obj) { MysticsItemsRhythmHUD.RefreshForHUDInstance(obj); }