コード例 #1
0
        public DrinkMotion(DrinkWater drinkWater)
        {
            DrinkMotionCallback drinkMotionCallback = new DrinkMotionCallback();

            drinkMotionCallback.addCallback(drinkWater);
            javaDrinkMotion = new AndroidJavaObject("com.bowhead.sheldon.water.DrinkMotion", AndroidContextHolder.GetAndroidContext(), drinkMotionCallback);
        }
コード例 #2
0
ファイル: Human.cs プロジェクト: bassel97/GGJ_2020
    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;
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     Drink = this.GetComponent <DrinkWater>();
     judge = this.GetComponent <Judge>();
 }
コード例 #4
0
 public void RemoveDrinkWaterCallBack(DrinkWater callBack)
 {
     DrinkWaterCallBackEvent -= callBack;
 }
コード例 #5
0
 public void AddDrinkWaterCallBack(DrinkWater callBack)
 {
     DrinkWaterCallBackEvent += callBack;
 }
コード例 #6
0
 public WaterManager(DrinkWater drinkWater)
 {
     drinkMotion = new DrinkMotion(drinkWater);
     context     = AndroidContextHolder.GetAndroidContext();
 }
コード例 #7
0
 public void addCallback(DrinkWater drinkWater)
 {
     mDrinkWater = drinkWater;
 }