public FightBusinessEctype(FightObject[] teamA, FightObject[] teamB, List<PlayerBusiness> players, TeamInstanceBusiness tb, EctypeApc apc) : base(teamA, teamB, players, apc.Apc.ID, true) { tb.Astate = ActionState.Fight; m_tb = tb; m_apc = apc; }
/// <summary> /// 初始化战斗怪 /// </summary> /// <param name="inScene"></param> /// <param name="drame"></param> private void InitDrame(SceneBusiness inScene, IList drame) { int total = 0; foreach (object item in drame) { Variant config = item as Variant; if (config != null) { Variant apcs = config.GetVariantOrDefault("VisibleAPC"); if (apcs != null) { int count = config.GetIntOrDefault("Count", 1); string apcid = apcs.GetStringOrDefault(Difficulty); if (!string.IsNullOrEmpty(apcid)) { Rectangle range = RangeHelper.NewRectangle(config.GetVariantOrDefault("Range"), true); for (int i = 0; i < count; i++) { EctypeApc ecApc = new EctypeApc(apcid); if (ecApc.Apc != null) { ecApc.ID = (total++); ecApc.Say = config.GetIntOrDefault("Say"); ecApc.Batch = config.GetIntOrDefault("Batch"); Point point = inScene.RandomBronPoint(range); if (point.X == 0) { Console.WriteLine(""); } ecApc.X = point.X; ecApc.Y = point.Y; m_currentApcs.Add(ecApc); } } } } } } }