Esempio n. 1
0
        private void RaiseLevelCompletedEvent()
        {
            var levelCompleteData = Factory.ProgressFactory.CreateLevelCompleteData(_levelModel.LevelNumber, Score.CurrentScore, Score.StarAmount, MovesController.MovesLeft);
            var blockGoalList     = Goals.GetBlockGoals();

            AudioManager.PlaySoundFx(SoundFxType.LevelComplete);

            LevelCompletedEvent?.Invoke(this, new LevelCompleteEventArgs()
            {
                CompleteData = levelCompleteData, BlockGoalsList = blockGoalList
            });
        }
Esempio n. 2
0
        // --- Functions ---

        /// <summary>
        /// Tell this Player what their target goal is
        /// </summary>
        /// <param name="observable">The TriggerObservable of the goal that the player should aim for</param>
        public void TargetGoal(TriggerObservable observable)
        {
            observable.TriggerEnter += Goals.OnBallGoal(_ => Score += 1);
            observable.TriggerEnter += Goals.OnBallGoal(
                _ => Debug.LogFormat("[PlayerScore] GOAL!!! {0}, Score: {1}", Name, Score));
        }