public CmdBallQueue(int side, List <int> queue) : this() { CmdData = new StructBattleCommand(); CmdData.Side = (sbyte)side; CmdData.Type = (int)Type; CmdData.BallQueue = new BallQueue(); CmdData.BallQueue.Queue = queue; }
public CmdSceneTransform(Vector2 translation, float rotation) : this() { CmdData = new StructBattleCommand(); CmdData.Side = 2; CmdData.Type = (int)Type; CmdData.SceneTransform = new SceneTransform(); CmdData.SceneTransform.Translation = new Vector2D(); CmdData.SceneTransform.Translation.X = translation.x; CmdData.SceneTransform.Translation.Y = translation.y; CmdData.SceneTransform.Rotation = rotation; }
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 CmdFallBall(int side, int reason, List <int> ballIds, int collisionBallId = -1) : this() { CmdData = new StructBattleCommand(); CmdData.Side = (sbyte)side; CmdData.Type = (int)Type; CmdData.FallBall = new FallBall(); CmdData.FallBall.Reason = (sbyte)reason; CmdData.FallBall.BallIds = ballIds; if (reason == 0) { CmdData.FallBall.CollisionBallId = collisionBallId; } }
public CmdFireBall(int side, int type, Vector2 startPosition, Vector2 dir, Vector2 collisionPoint, GridPosition destGrid, bool isFlyout, float speed) : this() { CmdData = new StructBattleCommand(); CmdData.Side = (sbyte)side; CmdData.Type = (int)Type; CmdData.FireBall = new FireBall(); CmdData.FireBall.Type = type; CmdData.FireBall.StartPosition = new Vector2D(); CmdData.FireBall.StartPosition.X = startPosition.x; CmdData.FireBall.StartPosition.Y = startPosition.y; CmdData.FireBall.Dir = new Vector2D(); CmdData.FireBall.Dir.X = dir.x; CmdData.FireBall.Dir.Y = dir.y; CmdData.FireBall.CollisionPoint = new Vector2D(); CmdData.FireBall.CollisionPoint.X = collisionPoint.x; CmdData.FireBall.CollisionPoint.Y = collisionPoint.y; CmdData.FireBall.DestGrid = new GridCoord(); CmdData.FireBall.DestGrid.Col = destGrid.col; CmdData.FireBall.DestGrid.Row = destGrid.row; CmdData.FireBall.IsFlyout = isFlyout; CmdData.FireBall.Speed = speed; }
public CmdFireBallResponse(int side, int type, Vector2 startPosition, Vector2 dir, Vector2 collisionPoint, GridPosition destGrid, int ballId, float speed, int result) : this() { CmdData = new StructBattleCommand(); CmdData.Side = (sbyte)side; CmdData.Type = (int)Type; CmdData.FireBallResponse = new FireBallResponse(); CmdData.FireBallResponse.Type = type; CmdData.FireBallResponse.StartPosition = new Vector2D(); CmdData.FireBallResponse.StartPosition.X = startPosition.x; CmdData.FireBallResponse.StartPosition.Y = startPosition.y; CmdData.FireBallResponse.Dir = new Vector2D(); CmdData.FireBallResponse.Dir.X = dir.x; CmdData.FireBallResponse.Dir.Y = dir.y; CmdData.FireBallResponse.CollisionPoint = new Vector2D(); CmdData.FireBallResponse.CollisionPoint.X = collisionPoint.x; CmdData.FireBallResponse.CollisionPoint.Y = collisionPoint.y; CmdData.FireBallResponse.DestGrid = new GridCoord(); CmdData.FireBallResponse.DestGrid.Col = destGrid.col; CmdData.FireBallResponse.DestGrid.Row = destGrid.row; CmdData.FireBallResponse.BallId = ballId; CmdData.FireBallResponse.Speed = speed; CmdData.FireBallResponse.Result = (sbyte)result; }
private CmdFallBall(StructBattleCommand cmd) : this() { CmdData = cmd; }
private ProtoSCBattleCommand() : base(MessageId.SC_BattleCommand) { m_data = new StructBattleCommand(); }
public CmdExchangeBall(int side) : this() { CmdData = new StructBattleCommand(); CmdData.Side = (sbyte)side; CmdData.Type = (int)Type; }
private CmdExchangeBall(StructBattleCommand cmd) : this() { CmdData = cmd; }
public ProtoCSBattleCommand(BattleCommand cmd) : this() { m_data = cmd.CmdData; }
private ProtoCSBattleCommand() : base(MessageId.CS_BattleCommand) { m_data = new StructBattleCommand(); }
private CmdSceneTransform(StructBattleCommand cmd) : this() { CmdData = cmd; }
private CmdFireBallResponse(StructBattleCommand cmd) : this() { CmdData = cmd; }
private CmdBallQueue(StructBattleCommand cmd) : this() { CmdData = cmd; }