public void RefreshActor(double contextualId, short cellEnd) { if (Players.Find(p => p.ContextualId == contextualId) != null) { Players.Find(p => p.ContextualId == contextualId).Disposition.CellId = cellEnd; Console.WriteLine( $@"(Players) { Players.Find(p => p.ContextualId == contextualId).Name } se déplace sur la cellid -> {cellEnd}"); } else if (Monsters.Find(p => p.ContextualId == contextualId) != null) { Monsters.Find(p => p.ContextualId == contextualId).Disposition.CellId = cellEnd; Console.WriteLine($@"(Monsters) se déplace sur la cellid -> {cellEnd}"); } else if (Others.Find(p => p.ContextualId == contextualId) != null) { Others.Find(p => p.ContextualId == contextualId).Disposition.CellId = cellEnd; Console.WriteLine($@"(Others) se déplace sur la cellid -> {cellEnd}"); } else if (Npcs.Find(p => p.ContextualId == contextualId) != null) { Npcs.Find(p => p.ContextualId == contextualId).Disposition.CellId = cellEnd; Console.WriteLine($@"(Npcs) se déplace sur la cellid -> {cellEnd}"); } else { Console.WriteLine($@"Quelque chose se déplace sur la cellid -> {cellEnd}"); } }
public static Player FindInOthers(System.Predicate <Player> predicate) { return(Others.Find(predicate)); }