public void Init(int id, string arg, ChallengeModeBase challengedata) { this._id = id; this.mArg = arg; this.mChallenge = challengedata; this.OnInit(); }
public void Challenge_DeInit() { if (this.mChallenge != null) { this.mChallenge.DeInit(); this.mChallenge = null; } }
public void Challenge_Init(int id) { this.Challenge_DeInit(); if (id != 0) { this.ActiveID = id; string[] args = this.ActiveData.Args; if (args.Length <= 0) { SdkManager.Bugly_Report("BattleModuleData", Utils.FormatString("InitChallengeData args length == 0.", Array.Empty <object>())); } char[] separator = new char[] { ':' }; int num = int.Parse(args[0].Split(separator)[0]); object[] objArray1 = new object[] { "ChallengeMode", num }; Type type = Type.GetType(Utils.GetString(objArray1)); object[] objArray2 = new object[] { "ChallengeMode", num }; this.mChallenge = type.Assembly.CreateInstance(Utils.GetString(objArray2)) as ChallengeModeBase; this.mChallenge.Init(this.ActiveData); } }