Beispiel #1
0
 public void Dispose()
 {
     this.camera.Dispose();
     this.camera = null;
     this._maze.Dispose();
     this._fxManager.Dispose();
     this._buffManager.Dispose();
     this._entityManager.Dispose();
     this._gameObjectManager.Dispose();
     this._eventHandler.Dispose();
     this._data       = null;
     CPlayer.instance = null;
     this._terminus   = null;
 }
Beispiel #2
0
        public CBattle(BattleParams param)
        {
            this._uid  = param.uid;
            this._data = ModelFactory.GetMapData(Utils.GetIDFromRID(param.id));

            this._maze = new GMaze(this, this._data.scale.ToVector3(), this._data.offset.ToVector3(), this._data.row,
                                   this._data.col);
            this._context           = new UpdateContext();
            this._eventHandler      = new CBattleEventHandler(this);
            this._gameObjectManager = new GameObjectManager();
            this._fxManager         = new FxManager(this);
            this._buffManager       = new CBuffManager(this);
            this._entityManager     = new CEntityManager(this);
            this._debugDrawer       = new DebugDrawer();

            this.camera        = new CCamera(this._data);
            this.camera.enable = false;
            //this.camera.SetConstraints(
            //	new Vector3( 0, 0, -this._maze.row * this._maze.scale.z ),
            //	new Vector3( this._maze.col * this._maze.scale.x, 0, 0 ) );
        }