public BattleMissionBase(EBattleCommandType cmdType, BattleField battleField) { m_battleField = battleField; m_battleFieldObj = m_battleField.BattleFieldObj; m_balls = m_battleField.Balls; m_cmdType = cmdType; m_waitBalls = m_battleField.WaitBalls; m_waitBallsType = m_battleField.WaitBallsType; }
public static BattleCommand CreateInstance(StructBattleCommand cmd) { EBattleCommandType type = (EBattleCommandType)cmd.Type; if (s_battleCommandConstructorDic.ContainsKey(type)) { BattleCommand command = s_battleCommandConstructorDic[type].Invoke(new object[] { cmd }) as BattleCommand; return(command); } return(null); }
public static BattleMissionBase CreateBattleMission(EBattleCommandType type, BattleField battleField) { BattleMissionBase bm = null; switch (type) { case EBattleCommandType.CmdFireBallResponse: bm = new BMAddBall(type, battleField); break; case EBattleCommandType.CmdEraseBall: bm = new BMEraseBall(type, battleField); break; case EBattleCommandType.CmdFallBall: bm = new BMFallBall(type, battleField); break; case EBattleCommandType.CmdExchangeBall: bm = new BMExChangeBall(type, battleField); break; case EBattleCommandType.CmdBallQueue: bm = new BMBallQueue(type, battleField); break; case EBattleCommandType.CmdSceneTransform: bm = new BMFceneTransform(type, battleField); break; default: bm = null; break; } return(bm); }
public BMFallBall(EBattleCommandType type, BattleField battleField) : base(type, battleField) { m_fallTime = ConfigHelper.GetSysConfig(ESysConfig.BubbleFallTime) * 0.001f; }
public BMEraseBall(EBattleCommandType type, BattleField battleField) : base(type, battleField) { }
protected BattleCommand(EBattleCommandType type) { _type = type; }
public BMFceneTransform(EBattleCommandType type, BattleField battleField) : base(type, battleField) { }
public BMBallQueue(EBattleCommandType type, BattleField battleField) : base(type, battleField) { }