public void Broken(Cup cup) { foreach (var target in brokenListeners) { ExecuteEvents.Execute <IBrokenCup>(target, null, (x, data) => x.OnBrokenCup(cup)); } }
public void Complete(Cup cup) { foreach (var target in completeListeners) { ExecuteEvents.Execute <ICompleteCup>(target, null, (x, data) => x.OnCompleteCup(cup)); } }
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(); }
public void OnCreateCup(Cup cup) { Cup = cup; }
// Use this for initialization void Start() { Cup = FindObjectOfType <Cup>(); CupFactory.Instance.AddCreateListener(gameObject); }
public void OnBrokenCup(Cup _cup) { Combo = 0; CupFactory.Create(); }
public void OnCreateCup(Cup _cup) { cup = _cup; }