Example #1
0
 // 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);
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     menu = GameObject.FindGameObjectsWithTag("sushimenu")[0].GetComponent <SushiMenu>();
 }
Example #4
0
 // 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);
        }
 }