コード例 #1
0
    public void exec()
    {
        if (!executable)
        {
            return;
        }
        Cube cube = GameObject.Find("cube").GetComponent <Cube>();

        cube.Back();
    }
コード例 #2
0
        private static void ProcessCommand(Cube cube, Command command, int time)
        {
            switch (command)
            {
            case Command.Up:
                cube.Forward(time);
                break;

            case Command.Down:
                cube.Back(time);
                break;

            case Command.Left:
                cube.TurnLeft(time);
                break;

            case Command.Right:
                cube.TurnRight(time);
                break;

            default:
                throw new NotSupportedException();
            }
        }
コード例 #3
0
ファイル: SimpleScene.cs プロジェクト: wuyuntao/Synchronica
        private static void ProcessCommand(Cube cube, Command command, int time)
        {
            switch (command)
            {
                case Command.Up:
                    cube.Forward(time);
                    break;

                case Command.Down:
                    cube.Back(time);
                    break;

                case Command.Left:
                    cube.TurnLeft(time);
                    break;

                case Command.Right:
                    cube.TurnRight(time);
                    break;

                default:
                    throw new NotSupportedException();
            }
        }