Example #1
0
 // Token: 0x06000D27 RID: 3367 RVA: 0x001374D0 File Offset: 0x001356D0
 protected override void UpdateLoad(byte[] meg)
 {
     GameManager.RegisterObserver(1, 0, this, 1);
     RenderSettings.ambientLight          = GameConstants.DefaultAmbientLight;
     DataManager.Instance.GoToBattleOrWar = GameplayKind.Front;
     this.oldKingdomID     = DataManager.MapDataController.kingdomData.kingdomID;
     this.oldKVKKingdomID  = DataManager.MapDataController.KVKKingdomID;
     this.oldKingdomPeriod = DataManager.MapDataController.kingdomData.kingdomPeriod;
     DataManager.MapDataController.FocusKingdomID             = (DataManager.MapDataController.kingdomData.kingdomID = 1);
     DataManager.MapDataController.OtherKingdomData.kingdomID = (DataManager.MapDataController.KVKKingdomID = 2);
     DataManager.MapDataController.kingdomData.kingdomPeriod  = KINGDOM_PERIOD.KP_KVK;
     DataManager.MapDataController.FocusMapID = GameConstants.TileMapPosToMapID((int)this.viewStartPoint.x, (int)this.viewStartPoint.y);
     ParticleManager.Instance.Setup();
     if (Camera.main.fieldOfView != 25f)
     {
         Camera.main.fieldOfView = 25f;
     }
     Camera.main.transform.position            = new Vector3(0f, 0f, -16f);
     Camera.main.transform.eulerAngles         = new Vector3(0f, 0f, 0f);
     Camera.main.cullingMask                  |= 1;
     GUIManager.Instance.m_UICanvas.renderMode = RenderMode.ScreenSpaceCamera;
     GUIManager.Instance.SetCameraorthOgraphic(true);
     AudioManager.Instance.LoadAndPlayBGM(BGMType.Newie, 1, false);
     GUIManager.Instance.OpenMenu(EGUIWindow.UI_Front, 0, 0, false, false, false);
     AssetManager.Instance.AssetManagerState = AssetState.Ready;
     NewbieLog.Log(ENewbieLogKind.FORCE_1, 0);
 }
Example #2
0
    // Token: 0x06000D29 RID: 3369 RVA: 0x00137B5C File Offset: 0x00135D5C
    protected override void UpdateRun(byte[] meg)
    {
        if ((int)this.nowFirstWordID < this.FstWordID.Length)
        {
            Color color = this.WordTextFirst.color;
            switch (this.FstWordState)
            {
            case Front.FrontFlag.In:
                color.a += Time.deltaTime * this.wordFadInSpeed;
                if (color.a > 0.55f)
                {
                    this.SecWordState = Front.FrontFlag.In;
                }
                if (color.a >= 1f)
                {
                    color.a           = 1f;
                    this.FstWordState = Front.FrontFlag.Wait;
                }
                this.WordTextFirst.color = color;
                break;

            case Front.FrontFlag.Out:
                color.a -= Time.deltaTime * this.wordFadOutSpeed;
                if (color.a <= 0f)
                {
                    color.a              = 0f;
                    this.FstWordState    = Front.FrontFlag.Zoom;
                    this.nowFirstWordID += 1;
                    if ((int)this.nowFirstWordID < this.FstWordID.Length)
                    {
                        this.WordTextFirst.text = DataManager.Instance.mStringTable.GetStringByID(this.FstWordID[(int)this.nowFirstWordID]);
                        this.WordTextFirst.SetAllDirty();
                    }
                }
                this.WordTextFirst.color = color;
                break;

            case Front.FrontFlag.Wait:
                this.FirstWordStayTime -= Time.deltaTime;
                if (this.FirstWordStayTime <= 0f)
                {
                    this.FirstWordStayTime = this.FirstWordStayTimeMax;
                    this.FstWordState      = Front.FrontFlag.Out;
                }
                break;

            case Front.FrontFlag.Delay:
                if ((double)this.cloth.color.a <= 0.6)
                {
                    this.FstWordState = Front.FrontFlag.In;
                }
                break;
            }
        }
        if ((int)this.nowSecWordID < this.SecWordID.Length)
        {
            Color color2 = this.WordTextSec.color;
            switch (this.SecWordState)
            {
            case Front.FrontFlag.In:
                color2.a += Time.deltaTime * this.wordFadInSpeed;
                if (color2.a >= 1f)
                {
                    color2.a          = 1f;
                    this.SecWordState = Front.FrontFlag.Wait;
                }
                this.WordTextSec.color = color2;
                break;

            case Front.FrontFlag.Out:
                color2.a -= Time.deltaTime * this.wordFadOutSpeed;
                if (color2.a <= 0.1f)
                {
                    this.FstWordState = Front.FrontFlag.In;
                    GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 6, 0);
                }
                else
                {
                    GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 7, 0);
                }
                if (color2.a <= 0f)
                {
                    color2.a           = 0f;
                    this.SecWordState  = Front.FrontFlag.Zoom;
                    this.nowSecWordID += 1;
                    if ((int)this.nowSecWordID < this.SecWordID.Length)
                    {
                        this.WordTextSec.text = DataManager.Instance.mStringTable.GetStringByID(this.SecWordID[(int)this.nowSecWordID]);
                        this.WordTextSec.SetAllDirty();
                    }
                    else
                    {
                        this.ClothState = Front.FrontFlag.In;
                    }
                }
                this.WordTextSec.color = color2;
                break;

            case Front.FrontFlag.Wait:
                this.SecWordStayTime -= Time.deltaTime;
                if (this.SecWordStayTime <= 0f)
                {
                    this.SecWordStayTime = this.SecWordStayTimeMax;
                    this.SecWordState    = Front.FrontFlag.Out;
                }
                break;
            }
        }
        Color color3 = this.cloth.color;

        switch (this.ClothState)
        {
        case Front.FrontFlag.In:
            if (this.delay > 0f)
            {
                this.delay -= Time.deltaTime;
            }
            else
            {
                color3.a += Time.deltaTime * this.wordFadOutSpeed * 1.2f;
                if (color3.a >= 1f)
                {
                    color3.a        = 1f;
                    this.ClothState = Front.FrontFlag.Move;
                    this.FrontGroupTransform.gameObject.SetActive(true);
                    this.iniMapData();
                    GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 1, 0);
                }
            }
            break;

        case Front.FrontFlag.Out:
            color3.a -= Time.deltaTime * this.wordFadOutSpeed * 0.4f;
            if (color3.a <= 0f)
            {
                color3.a        = 0f;
                color3.r        = 1f;
                color3.g        = 0.914f;
                color3.b        = 0.408f;
                this.ClothState = Front.FrontFlag.Wait;
            }
            break;

        case Front.FrontFlag.Move:
            color3.a -= Time.deltaTime * this.wordFadOutSpeed * 2f;
            if (color3.a <= 0f)
            {
                color3.a        = 0f;
                this.ClothState = Front.FrontFlag.Wait;
            }
            break;
        }
        this.cloth.color = color3;
        if ((this.frontFlag & 32) != 0)
        {
            this.FrontGroupTransform.localScale += Vector3.one * Time.deltaTime * this.frontZoomSpeed;
            this.directController.RealmGroup_3DTransform.localScale = this.FrontGroupTransform.localScale;
            DataManager.MapDataController.zoomSize = this.FrontGroupTransform.localScale.x;
            this.directController.mapTileController.Check3DPos();
        }
        if ((this.frontFlag & 4) != 0)
        {
            this.directController.mapTileController.Movedelta = this.frontMove * Time.deltaTime * DataManager.MapDataController.zoomSize;
        }
        if ((this.frontFlag & 1) != 0)
        {
            this.frontFlag &= -2;
            Front.FrontState frontState = this.frontState;
            if (frontState == Front.FrontState.Around)
            {
                this.frontWaitTime = 8f;
                this.frontFlag    |= 8;
            }
        }
        if ((this.frontFlag & 2) != 0 && this.cloth.color.a < 1f)
        {
            Color color4 = this.cloth.color;
            color4.a += Time.deltaTime * this.frontFadeSpeed;
            if (color4.a >= 1f)
            {
                color4.a        = 1f;
                this.frontFlag &= -3;
                Front.FrontState frontState = this.frontState;
                if (frontState == Front.FrontState.Around)
                {
                    this.directController.mapTileController.MovebyTileMapPos((int)this.startPoint.x, (int)this.startPoint.y, false);
                    this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero);
                    this.frontFlag     &= -5;
                    this.frontFlag     |= 1;
                    this.frontZoomSpeed = 0.25f;
                    this.frontFlag     |= 32;
                    this.frontState     = Front.FrontState.Speak;
                }
            }
            this.cloth.color = color4;
        }
        if ((this.frontFlag & 8) != 0 && this.frontWaitTime > 0f)
        {
            this.frontWaitTime -= Time.deltaTime;
            if (this.frontWaitTime <= 0f)
            {
                this.frontWaitTime = 0f;
                this.frontFlag    &= -9;
                switch (this.frontState)
                {
                case Front.FrontState.Around:
                    if ((this.frontFlag & 32) != 0)
                    {
                        this.frontWaitTime = 0.1f;
                        this.frontFlag    |= 8;
                        this.directController.mapTileController.MovebyTileMapPos((int)this.startPoint.x, (int)this.startPoint.y, false);
                        this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero);
                        this.frontFlag &= -5;
                        DataManager.MapDataController.zoomSize = 0.9503304f;
                        this.frontZoomSpeed = 0f;
                        this.frontFlag     &= -33;
                        this.frontState     = Front.FrontState.Speak;
                    }
                    else
                    {
                        this.frontMove     *= 3.35f;
                        this.frontWaitTime  = 1.6f;
                        this.frontFlag     |= 8;
                        this.frontZoomSpeed = 0.125f;
                        this.frontFlag     |= 32;
                    }
                    break;

                case Front.FrontState.Go:
                    this.frontState     = Front.FrontState.Ready;
                    this.frontZoomSpeed = 3.25f;
                    this.frontFlag     |= 32;
                    this.frontWaitTime  = 1E-05f;
                    this.frontFlag     |= 8;
                    break;

                case Front.FrontState.Speak:
                    GUIManager.Instance.OpenOtherCanvasMenu(EGUIWindow.UI_HeroTalk, 12, 1);
                    NewbieLog.Log(ENewbieLogKind.FORCE_1, 1);
                    break;

                case Front.FrontState.Ready:
                    AudioManager.Instance.PlayMP3SFX(this.readySFXID, 0f);
                    WarManager.SetupNewbieWar();
                    GUIManager.Instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.MapToWar);
                    break;
                }
            }
        }
        if ((this.frontFlag & 16) != 0)
        {
            if (this.lineNode.timeOffset * this.lineNode.inverseMaxTime > 1f)
            {
                this.directController.mapTileController.MovebyTileMapPos((int)this.endPoint.x, (int)this.endPoint.y, false);
                this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero);
                this.frontFlag    &= -17;
                this.frontWaitTime = 1.5f;
                this.frontFlag    |= 8;
                this.directController.DelLine(this.controlMapLineTableID, 1, 0);
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].MapLineInit();
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineID = 0u;
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].playerName.AppendFormat(DataManager.Instance.RoleAttr.Name);
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineFlag = 23;
                GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.endPoint.x, (int)this.endPoint.y), out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].start.zoneID, out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].start.pointID);
                GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.startPoint.x, (int)this.startPoint.y), out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].end.zoneID, out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].end.pointID);
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].during   = 5u;
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].begin    = (ulong)NetworkManager.ServerTime;
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].EXbegin  = (DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].EXduring = 0u);
                DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineFlag = 23;
                this.directController.AddLine(this.controlMapLineTableID, true);
                PlayerPoint[] playerPointTable = DataManager.MapDataController.PlayerPointTable;
                ushort        num = this.controlMapPlayerTableID;
                playerPointTable[(int)num].capitalFlag = (playerPointTable[(int)num].capitalFlag | 2);
                this.directController.UpdatePoint((uint)GameConstants.TileMapPosToMapID((int)this.endPoint.x, (int)this.endPoint.y));
            }
            else
            {
                this.directController.mapTileController.Movedelta  = new Vector2(this.lineNode.movingNode.position.x, this.lineNode.movingNode.position.y);
                this.directController.mapTileController.Movedelta /= -this.Canvasrectran.localScale.x;
            }
        }
        if (this.checklineNode != null && this.checklineNode.timeOffset * this.checklineNode.inverseMaxTime > 1f)
        {
            this.directController.DelLine(this.checkMapLineTableID, 1, 0);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].MapLineInit();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].lineID = 0u;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.IntToFormat((long)this.checkMapLineTableID, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.AppendFormat("{0}");
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].kingdomID = this.KID[this.checkMapLineTableID];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.AppendFormat("{0}{1}{2}");
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID].x, (int)this.LineEndPoint[this.checkMapLineTableID].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].start.pointID);
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID].x, (int)this.LineStartPoint[this.checkMapLineTableID].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].end.pointID);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].during    = this.LineDuring[this.checkMapLineTableID];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].begin     = (ulong)NetworkManager.ServerTime;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXbegin   = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXduring = 0u);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].lineFlag  = 23;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXduring += 5u;
            this.directController.AddLine(this.checkMapLineTableID, false);
            this.checklineNode = null;
        }
        if (this.checklineNode_EX != null && this.checklineNode_EX.timeOffset * this.checklineNode_EX.inverseMaxTime > 1f)
        {
            this.directController.DelLine(this.checkMapLineTableID_EX, 1, 0);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].MapLineInit();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].lineID = 0u;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.IntToFormat((long)this.checkMapLineTableID_EX, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.AppendFormat("{0}");
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].kingdomID = this.KID[this.checkMapLineTableID_EX];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.AppendFormat("{0}{1}{2}");
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID_EX].x, (int)this.LineEndPoint[this.checkMapLineTableID_EX].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].start.pointID);
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID_EX].x, (int)this.LineStartPoint[this.checkMapLineTableID_EX].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].end.pointID);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].during   = this.LineDuring[this.checkMapLineTableID_EX];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].begin    = (ulong)NetworkManager.ServerTime;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].EXbegin  = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].EXduring = 0u);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].lineFlag = 18;
            this.directController.AddLine(this.checkMapLineTableID_EX, false);
            this.checklineNode_EX = null;
        }
        if (this.checklineNode_PLUS != null && this.checklineNode_PLUS.timeOffset * this.checklineNode_PLUS.inverseMaxTime > 1f)
        {
            this.directController.DelLine(this.checkMapLineTableID_PLUS, 1, 0);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].MapLineInit();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].lineID = 0u;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.AppendFormat("{0}");
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].kingdomID = this.KID[this.checkMapLineTableID_PLUS];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.ClearString();
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.AppendFormat("{0}{1}{2}");
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID_PLUS].x, (int)this.LineEndPoint[this.checkMapLineTableID_PLUS].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].start.pointID);
            GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID_PLUS].x, (int)this.LineStartPoint[this.checkMapLineTableID_PLUS].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].end.pointID);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].during    = this.LineDuring[this.checkMapLineTableID_PLUS];
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].begin     = (ulong)NetworkManager.ServerTime;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXbegin   = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXduring = 0u);
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].lineFlag  = 23;
            DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXduring += 5u;
            this.directController.AddLine(this.checkMapLineTableID_PLUS, false);
            this.checklineNode_PLUS = null;
        }
    }