public FightSequence(int id, SequenceTypeEnum type, FightActor author) { Id = id; Type = type; Author = author; StartTime = DateTime.Now; }
public Sequence(ushort id, Fight fight, Fighter source, SequenceTypeEnum sequenceType) { this.Id = id; this.Source = source; this.SequenceType = sequenceType; this.Started = false; this.Ended = false; this.Acknowleged = false; }
public void EndSequence(SequenceTypeEnum sequenceType) { var seq = PendingSequences.FirstOrDefault(); if (seq != null) { seq.End(Fight); PendingSequences.Remove(seq); } }
public void SendSequence(SequenceTypeEnum sequenceType, List <NetworkMessage> messages, uint actionId = 3) { if (this.FightState == FightStateEnum.FIGHT_ENDED) { return; } messages.Insert(0, new SequenceStartMessage((int)sequenceType, this.ActualFighter.Id)); messages.Add(new SequenceEndMessage(actionId, this.ActualFighter.Id, (int)sequenceType)); this.SendToAllFighters(messages); }
public bool StartSequence(SequenceTypeEnum sequencetype) { if (PendingSequences.Find(x => x.SequenceType == sequencetype) != null) { return(false); } var newSequence = new Sequence(PopNextId(), Fight, Fight.FighterPlaying, sequencetype); newSequence.Start(Fight); PendingSequences.Add(newSequence); return(true); }
/// <summary> /// 解析処理 /// </summary> /// <param name="data">解析対象バイト配列</param> /// <param name="startIndex">解析開始インデックス</param> /// <returns>解析済みインデックス</returns> public override int Analyze(byte[] data, int startIndex) { int retVal = 0; int index = startIndex; int value = BitConverter.ToInt32(data, index); this.Sequence = (SequenceTypeEnum)value; index += sizeof(int); retVal = index; return(retVal); }
public SequenceData(SequenceTypeEnum type, int numberOfCharacters) { Type = type; NumberOfCharacters = numberOfCharacters; }
public static void SendSequenceEndMessage(IPacketReceiver client, FightActor entity, SequenceTypeEnum sequenceType, SequenceTypeEnum lastSequenceType) { client.Send(new SequenceEndMessage((ushort)lastSequenceType, entity.Id, (sbyte)sequenceType)); }
public static void SendSequenceStartMessage(IPacketReceiver client, FightActor entity, SequenceTypeEnum sequenceType) { client.Send(new SequenceStartMessage((sbyte)sequenceType, entity.Id)); }