Пример #1
0
 //接受外界输入的设置参数创建controller
 public PlayerController(ControllerConfig config)
 {
     actionStack = new Stack <TetrisGame.GameAction>();
     this.config = config;
     _isInversed = false;
 }
Пример #2
0
 public void SetConfig(ControllerConfig config)
 {
     this.config = config;
 }
Пример #3
0
        private Boolean _isInversed = false;  //是否设置反转左右按键

        //构造方法,初始化序列,读取配置文件
        public PlayerController()
        {
            actionStack = new Stack <TetrisGame.GameAction>();
            config      = new ControllerConfig();//如果未制定则使用默认配置.
            _isInversed = false;
        }