public void DecideActionTest()
        {
            Submarine submarine = new Submarine(new Position(7, 7));
            Captain   captain   = new Captain(submarine);

            for (int i = 0; i < 100; i++)
            {
                string action = captain.DecideAction();

                ActionsManager.Execute(submarine, action);
            }
        }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.UpArrow))
        {
            // get the action parameter
            ActionParameter lPara = new ActionParameter();
            lPara.ActionName = "Run";
            lPara.VectorT    = new Vector3(1, 0, 0);
            lPara.Speed      = 1.0;

            mActions.Execute(mMonsterDog.Name, "Run", lPara);
        }
    }