public virtual int OnBeginDay(Room[] rooms) { throw new NotImplementedException(); }
public void AssignFamily(Character spouse, List<Character> children, Room home, DNA husbandDna, DNA wifeDna) { DNA = husbandDna; Home = home; Spouse = spouse; spouse.Spouse = this; spouse.DNA = wifeDna; Children = new List<Character>(children); spouse.Children = new List<Character>(children); CharacterLog("Created family for " + Name + " with spouse: " + spouse.Name + " and children: " + string.Join(", ", children.Select(c => c.Name + "(" + c.Gender.ToString() + ")"))); //Assign the home to the dependents as well. spouse.Home = home; foreach(var c in children) { c.Home = home; c.Father = this; c.Mother = spouse; c.DNA = Game.CreateChildDNA(c, husbandDna, wifeDna); } }
public override int OnBeginDay(Room[] rooms) { TextTopBottomButton view = new TextTopBottomButton(null, this, "A new day greets you!\nWhere would you like to go?", rooms.Select(r => r.Name).ToArray(), null, notificator); main.LaunchView(view); return view.SelectedIndex; }
public Action[] FindAllowableActions(Room room, Character initiator) { return eventManager.FindAllowableActions(room, initiator, this); }
public void ExecuteOnObserve(Character currentCharacter, Game game, Room room) { foreach(var param in information.Parameters) { if(param.Type == typeof(Character) && param.Inform) { Character curr = parameters[param.Name] as Character; curr.AddHistory(this); } } //The current character is the root of the new context so that they will be the //default scope in the on_observe we are about to run. EventContext observeContext = new EventContext(currentCharacter, parameters); information.OnObserve.Execute(new EventResults(), game, observeContext); observeContext.Commit(); }
public void ExecuteOnTold(Character currentCharacter, Game game, Room room) { //The current character is the root of the new context so that they will be the //default scope in the on_told we are about to run. // We might need tellingCharacter here but removing it for now since it's never used. EventContext observeContext = new EventContext(currentCharacter, parameters); information.OnTold.Execute(new EventResults(), game, observeContext); observeContext.Commit(); }