示例#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;
 }