/// <summary> /// Executes this command /// </summary> public override void Execute() { var sb = new List<string>(); var player = (Player)Actor; sb.Add("You save your life."); var messagingObject = new MessageCluster(sb, new string[] { }, new string[] { }, new string[] { }, new string[] { }); messagingObject.ExecuteMessaging(Actor, null, null, OriginLocation, null); var playerDataWrapper = new PlayerData(); //Save the player out playerDataWrapper.WriteOnePlayer(player); }
/// <summary> /// Executes this command /// </summary> public override void Execute() { var sb = new List<string>(); var player = (Player)Actor; sb.Add("You exit this reality."); var messagingObject = new MessageCluster(sb, new string[] { }, new string[] { }, new string[] { "$A$ exits this reality." }, new string[] { }); messagingObject.ExecuteMessaging(Actor, null, null, OriginLocation, null); var playerDataWrapper = new PlayerData(); //Save the player out playerDataWrapper.WriteOnePlayer(player); player.CloseConnection(); }