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