예제 #1
0
 //---------------------------------------------------------------------
 public override void enter()
 {
     // 关闭所有子弹的碰撞
     mLevel.closeBulletCollision();
     mLevel.setTimeFactor(1);
     mLevel.getSpriteLevel().switchBackgroundMap(mLevel.NextMapVibId, mLevel.LevelCurRunSecond);
 }
        float mfCurSecond   = 0.0f;// 关卡当前运行总秒数

        //---------------------------------------------------------------------
        public CRenderLevelStateNormal(CRenderScene render_scene, CRenderLevel render_level)
        {
            _defState("CRenderLevelStateNormal", "EbFsm", 0, true);
            _bindAction("update", new EbAction(this.evUpdate));
            _bindAction("setState", new EbAction(this.evSetState));

            mScene = render_scene;
            mLevel = render_level;

            // 因为初始化的时候首先是这个状态先出来,所以在这里加载一下地图
            mLevel.getSpriteLevel().switchBackgroundMap(mLevel.CurMapVibId, 0);
        }