Ejemplo n.º 1
0
        /// <summary>
        /// Play the selected feedback
        /// </summary>
        void PlayFeedback(int id)
        {
            SerializedProperty property = _mmfeedbacks.GetArrayElementAtIndex(id);
            MMFeedback         feedback = property.objectReferenceValue as MMFeedback;

            feedback.Play(feedback.transform.position);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Play the selected feedback
        /// </summary>
        protected virtual void PlayFeedback(int id)
        {
            SerializedProperty property = _mmfeedbacks.GetArrayElementAtIndex(id);
            MMFeedback         feedback = property.objectReferenceValue as MMFeedback;

            feedback.Play(feedback.transform.position, _targetMMFeedbacks.FeedbacksIntensity);
        }
Ejemplo n.º 3
0
 private void GameOverCheck(int points)
 {
     if (points < 0)
     {
         OnGameOverfeedback.Play(Vector3.zero);
     }
 }
Ejemplo n.º 4
0
 private void StageCheck(int points)
 {
     if (PointsPercentage < 1)
     {
         return;
     }
     actualStage++;
     MaxStagePoints    *= 1.5f;
     TotalPoints        = 0;
     KeyGenerator.Speed = KeyGenerator.Speed * 1.1f;
     OnStageUpfeedback.Play(Vector3.zero);
     OnStateChange?.Invoke(actualStage);
 }
Ejemplo n.º 5
0
 public void Hitted(HitKey hitKey, SwipeType type)
 {
     if (hitKey.Type != type)
     {
         Missed(MissType.WrongDirection);
     }
     else
     {
         TotalPoints += hitKey.points;
         OnPointsChanged?.Invoke(TotalPoints);
         OnHit?.Invoke(PointsPercentage);
         OnHitfeedback?.Play(Vector3.zero);
     }
 }
Ejemplo n.º 6
0
 public void Missed(MissType type)
 {
     if (type == MissType.NoObject)
     {
         TotalPoints -= 5;
     }
     else if (type == MissType.WrongDirection)
     {
         TotalPoints -= 10;
     }
     OnPointsChanged?.Invoke(TotalPoints);
     OnMissed?.Invoke(type, PointsPercentage);
     OnMissfeedback?.Play(Vector3.zero);
 }