public DrinkMotion(DrinkWater drinkWater) { DrinkMotionCallback drinkMotionCallback = new DrinkMotionCallback(); drinkMotionCallback.addCallback(drinkWater); javaDrinkMotion = new AndroidJavaObject("com.bowhead.sheldon.water.DrinkMotion", AndroidContextHolder.GetAndroidContext(), drinkMotionCallback); }
public void SetUpActions() { actions.Clear(); for (int i = 0; i < noOfActions; i++) { ActionTypes actionType = (ActionTypes)Random.Range(0, Action.noOfActionTypes); Action action = null; switch (actionType) { case ActionTypes.DrinkWater: action = new DrinkWater(); break; case ActionTypes.SitDown: action = new SitDown(); break; case ActionTypes.Exit: action = new SitDown(); break; case ActionTypes.UseCashier: action = new UseCashier(); break; case ActionTypes.StartAttack: action = new SitDown(); break; default: break; } action.SetActionTaker(this); actions.Add(action); } Action exitAction = new ExitAction(); exitAction.SetActionTaker(this); actions.Add(exitAction); currActionIndex = 0; }
// Use this for initialization void Start() { Drink = this.GetComponent <DrinkWater>(); judge = this.GetComponent <Judge>(); }
public void RemoveDrinkWaterCallBack(DrinkWater callBack) { DrinkWaterCallBackEvent -= callBack; }
public void AddDrinkWaterCallBack(DrinkWater callBack) { DrinkWaterCallBackEvent += callBack; }
public WaterManager(DrinkWater drinkWater) { drinkMotion = new DrinkMotion(drinkWater); context = AndroidContextHolder.GetAndroidContext(); }
public void addCallback(DrinkWater drinkWater) { mDrinkWater = drinkWater; }