// Use this for initialization void Start() { menu = GameObject.FindGameObjectsWithTag("sushimenu")[0].GetComponent <SushiMenu>(); arrows = GameObject.FindGameObjectsWithTag("makiarrow"); foreach (GameObject arrow in arrows) { arrow.GetComponent <Arrow>().setMakiGame(this); } }
public GachaDrawer(DishHolder dishHolder, SushiMenu sushiMenu) { dishHolder.AddDishObservable .Where(_ => dishHolder.CurrentDishCount >= DrawCost) .Select(_ => { dishHolder.Remove(DrawCost); return(Master.Instance.SushiMaster.Lottery()); }) .SelectMany(gachaResult => UIGacha.Instance.DirectionAsObservable(gachaResult, sushiMenu.IsNewSushi(gachaResult)).Select(_ => gachaResult)) .Subscribe(gachaResult => { sushiMenu.Unlock(gachaResult); }) .AddTo(disposables); }
// Use this for initialization void Start() { menu = GameObject.FindGameObjectsWithTag("sushimenu")[0].GetComponent <SushiMenu>(); }
// Use this for initialization void Start() { menu = GameObject.FindGameObjectsWithTag("sushimenu")[0].GetComponent<SushiMenu>(); arrows = GameObject.FindGameObjectsWithTag("makiarrow"); foreach(GameObject arrow in arrows){ arrow.GetComponent<Arrow>().setMakiGame(this); } }