public override bool BeginTransition(SubMap @from, SubMapBinder to, PlayedCharacter character) { if (!character.ChangeMap(MapNeighbour, cell => Cells == null || Cells.Length == 0 || Array.IndexOf(Cells, cell.CellId) != -1)) { logger.Error("Cannot proceed transition : cannot reach {0} map from {1} (submap:{2} to {3})", MapNeighbour, character.Map.Id, @from.GlobalId, to.GlobalId); return false; } return true; }
public override bool BeginTransition(SubMap @from, SubMapBinder to, PlayedCharacter character) { if (!character.ChangeMap(MapNeighbour, cell => Cells == null || Cells.Length == 0 || Array.IndexOf(Cells, cell.CellId) != -1)) { logger.Error("Cannot proceed transition : cannot reach {0} map from {1} (submap:{2} to {3})", MapNeighbour, character.Map.Id, @from.GlobalId, to.GlobalId); return(false); } return(true); }
public virtual void OnTransitionEnded(SubMap from, SubMapBinder to, bool success) { TransitionEndedHandler evnt = TransitionEnded; if (evnt != null) evnt(this, from, to, success); }
public abstract bool BeginTransition(SubMap from, SubMapBinder to, PlayedCharacter character);