示例#1
0
 public override void Init(BaseMonoEntity entity)
 {
     this.avatar       = (BaseMonoAvatar)entity;
     base.runtimeID    = this.avatar.GetRuntimeID();
     this.config       = AvatarData.GetAvatarConfig(this.avatar.AvatarTypeName);
     base.commonConfig = this.config.CommonConfig;
     base.Init(entity);
     this.skillInfoList      = new List <SKillInfo>();
     this._skillInfoMap      = new Dictionary <string, SKillInfo>();
     this.maskedSkillButtons = new List <string>();
     foreach (string str in this.config.Skills.Keys)
     {
示例#2
0
        private void DebugCreateStageWithFullDataSync_Impl(Packet_Level_CreateStageFullData fullData)
        {
            Singleton <LevelScoreManager> .Instance.SetDevLevelBeginIntent("Lua/Levels/Common/Level 0.lua", LevelActor.Mode.NetworkedMP, 10, 10, null);

            Singleton <LevelScoreManager> .Instance.memberList = new List <AvatarDataItem>();
            for (int i = 0; i < fullData.AvatarsLength; i++)
            {
                MoleMole.MPProtocol.MPAvatarDataItem avatars = fullData.GetAvatars(i);
                AvatarDataItem item         = new AvatarDataItem(avatars.AvatarID, avatars.Level, avatars.Star);
                ConfigAvatar   avatarConfig = AvatarData.GetAvatarConfig(item.AvatarRegistryKey);
                WeaponDataItem dummyFirstWeaponDataByRole = Singleton <StorageModule> .Instance.GetDummyFirstWeaponDataByRole(avatarConfig.CommonArguments.RoleName, 1);

                item.equipsMap[1] = dummyFirstWeaponDataByRole;
                Singleton <LevelScoreManager> .Instance.memberList.Add(item);
            }
            Singleton <LevelManager> .Instance.levelActor.SuddenLevelStart();

            Singleton <LevelManager> .Instance.levelActor.levelMode = LevelActor.Mode.NetworkedMP;
            Singleton <MPLevelManager> .Instance.mpMode             = fullData.MpMode;
            if (fullData.MpMode == MPMode.Normal)
            {
                Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_Default_GameMode();
            }
            else if (fullData.MpMode == MPMode.PvP_ReceiveNoSend)
            {
                Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_PvPTest_GameMode();
            }
            else if (fullData.MpMode == MPMode.PvP_SendNoReceive)
            {
                Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_PvPTest_GameMode();
            }
            List <string> avatarSpawnNameList = new List <string> {
                "Born"
            };

            Singleton <StageManager> .Instance.CreateStage(fullData.StageData.StageName, avatarSpawnNameList, null, false);
        }
示例#3
0
        public ICinema GetCinemaDataByAvatar(string avatar, AvatarCinemaType type)
        {
            string str = AvatarData.GetAvatarConfig(avatar).CinemaPaths[type];

            return(this._loadedCinemaData[str]);
        }
        private void OnGUI()
        {
            GUILayout.BeginArea(new Rect(50f, 0f, (float)(Screen.width - 100), (float)Screen.height));
            GUILayout.Space(20f);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            GUILayout.Label("Avatar : ", options);
            this._widgetAvatarType.List(GUILayoutUtility.GetRect((float)20f, (float)(this._style.lineHeight * 1.5f)), this._avatarTypes, this._style, this._style, 1);
            GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            GUILayout.Label("AI : ", optionArray2);
            this._widgetAIType.List(GUILayoutUtility.GetRect((float)50f, (float)(this._style.lineHeight * 1.5f)), this._aiTypes, this._style, this._style, 1);
            GUILayoutOption[] optionArray3 = new GUILayoutOption[] { GUILayout.ExpandWidth(false), GUILayout.Width(100f) };
            if (GUILayout.Button("Add", optionArray3) && (DevLevelConfigData.avatarDevDatas.Count < 3))
            {
                string        text = this._avatarTypes[this._widgetAvatarType.GetSelectedItemIndex()].text;
                DevAvatarData item = new DevAvatarData {
                    avatarType = text
                };
                item.avatarTestSkills  = new string[] { "Test_UnlockAllAniSkill", "Test_Undamagable" };
                item.avatarAI          = "AI/Avatar/" + this._aiTypes[this._widgetAIType.GetSelectedItemIndex()].text;
                item.avatarWeapon      = WeaponData.GetFirstWeaponIDForRole(AvatarData.GetAvatarConfig(text).CommonArguments.RoleName);
                item.avatarLevel       = 1;
                item.avatarWeaponLevel = 1;
                item.avatarStigmata    = new int[] { -1, -1, -1 };
                DevLevelConfigData.avatarDevDatas.Add(item);
            }
            GUILayout.EndHorizontal();
            for (int i = 0; i < DevLevelConfigData.avatarDevDatas.Count; i++)
            {
                DevAvatarData data = DevLevelConfigData.avatarDevDatas[i];
                GUILayout.Label(string.Format("{0}: {1}", data.avatarType, data.avatarAI), new GUILayoutOption[0]);
            }
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayoutOption[] optionArray4 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            GUILayout.Label("Monster: ", optionArray4);
            int index = this._widgetMonsterNames.List(GUILayoutUtility.GetRect((float)20f, (float)(this._style.lineHeight * 1.5f)), this._monsterNames, this._style, this._style, 1);

            GUILayoutOption[] optionArray5 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            GUILayout.Label("Type: ", optionArray5);
            this._widgetMonsterTypes.List(GUILayoutUtility.GetRect((float)20f, (float)(this._style.lineHeight * 1.5f)), this._monsterTypes[index], this._style, this._style, 1);
            GUILayoutOption[] optionArray6 = new GUILayoutOption[] { GUILayout.ExpandWidth(false), GUILayout.Width(100f) };
            if (GUILayout.Button("Add", optionArray6))
            {
                DevMonsterData data4 = new DevMonsterData {
                    monsterName = this._monsterNames[this._widgetMonsterNames.GetSelectedItemIndex()].text,
                    typeName    = this._monsterTypes[this._widgetMonsterNames.GetSelectedItemIndex()][this._widgetMonsterTypes.GetSelectedItemIndex()].text
                };
                data4.abilities = new string[] { "Test_Undamagable" };
                data4.level     = 1;
                DevLevelConfigData.monsterDevDatas.Add(data4);
            }
            GUILayout.EndHorizontal();
            for (int j = 0; j < DevLevelConfigData.monsterDevDatas.Count; j++)
            {
                DevMonsterData data2 = DevLevelConfigData.monsterDevDatas[j];
                GUILayout.Label(string.Format("{0}, {1}", data2.monsterName, data2.typeName), new GUILayoutOption[0]);
            }
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            DevLevelConfigData.stageDevData.stageName = this._stages[this._widgetStages.GetSelectedItemIndex()].text;
            GUILayoutOption[] optionArray7 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            GUILayout.Label("Level: ", optionArray7);
            this._widgetLevels.List(GUILayoutUtility.GetRect((float)20f, (float)(this._style.lineHeight * 1.5f)), this._levels, this._style, this._style, 1);
            DevLevelConfigData.LEVEL_PATH = "Lua/Levels/" + this._levels[this._widgetLevels.GetSelectedItemIndex()].text;
            GUILayoutOption[] optionArray8 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
            this._multiMode = GUILayout.Toggle(this._multiMode, "Multi Mode?", optionArray8);
            GUILayout.EndHorizontal();
            this._widgetStages.List(GUILayoutUtility.GetRect((float)20f, (float)(this._style.lineHeight * 1.5f)), this._stages, this._style, this._style, 3);
            GUILayout.Space(50f);
            GUILayoutOption[] optionArray9 = new GUILayoutOption[] { GUILayout.Height(this._style.lineHeight * 3f) };
            if (GUILayout.Button("Start", optionArray9))
            {
                this.LoadDevLevel();
            }
            GUILayoutOption[] optionArray10 = new GUILayoutOption[] { GUILayout.Height(this._style.lineHeight * 3f) };
            if (GUILayout.Button("Render Scene", optionArray10))
            {
                SceneManager.LoadScene("RenderScene");
            }
            GUILayout.EndArea();
        }