예제 #1
0
 public void Broken(Cup cup)
 {
     foreach (var target in brokenListeners)
     {
         ExecuteEvents.Execute <IBrokenCup>(target, null, (x, data) => x.OnBrokenCup(cup));
     }
 }
예제 #2
0
 public void Complete(Cup cup)
 {
     foreach (var target in completeListeners)
     {
         ExecuteEvents.Execute <ICompleteCup>(target, null, (x, data) => x.OnCompleteCup(cup));
     }
 }
예제 #3
0
        public void OnCompleteCup(Cup _cup)
        {
            var score = Score.Instance;

            score?.AddScore(_cup.Score * ((Combo > 0) ? Combo : 1), Combo);
            SE.Instance?.Play(addScoreClip);
            Combo++;
            Destroy(cup.gameObject);
            CupFactory.Create();
        }
예제 #4
0
 public void OnCreateCup(Cup cup)
 {
     Cup = cup;
 }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     Cup = FindObjectOfType <Cup>();
     CupFactory.Instance.AddCreateListener(gameObject);
 }
예제 #6
0
 public void OnBrokenCup(Cup _cup)
 {
     Combo = 0;
     CupFactory.Create();
 }
예제 #7
0
 public void OnCreateCup(Cup _cup)
 {
     cup = _cup;
 }