public Character(GameRolePlayCharacterInformations characterInformations, Map map) : base(characterInformations.humanoidInfo) { if (characterInformations == null) throw new ArgumentNullException("characterInformations"); if (map == null) throw new ArgumentNullException("map"); // do not care about this warnings, this ctor is never called by his inheriter Id = characterInformations.contextualId; Look = characterInformations.look; Position = new ObjectPosition(map, characterInformations.disposition); Name = characterInformations.name; Alignement = new AlignmentInformations(characterInformations.alignmentInfos); }
public void Update(GameRolePlayCharacterInformations msg) { if (msg == null) throw new ArgumentNullException("msg"); Update(msg.disposition); Update(msg.humanoidInfo); Name = msg.name; Look = msg.look; if (Alignement == null) Alignement = new AlignmentInformations(msg.alignmentInfos); else Alignement.Update(msg.alignmentInfos); }
public void Update(GameRolePlayCharacterInformations msg) { if (msg == null) throw new ArgumentNullException("msg"); Position = new ObjectPosition(Map, Map.Cells[msg.disposition.cellId], (DirectionsEnum) msg.disposition.direction); Update(msg.humanoidInfo); Name = msg.name; Look = msg.look; if (Alignement == null) Alignement = new AlignmentInformations(msg.alignmentInfos); else Alignement.Update(msg.alignmentInfos); }