private void Start() { //init communcation channels textCommChannel = CommunicationChannelFactory.Make2WayTextChannel() as TextCommunicationChannel; oneWayCommChannel = CommunicationChannelFactory.MakeOneWayTextChannel() as OneWayTextCommunication; roomExitCommChannel = CommunicationChannelFactory.MakeRoomExitPathChannel() as RoomExitPathCommChannel; oneWayTimedComm = CommunicationChannelFactory.MakeOneWayTimedChannel() as OneWayTimedCommChannel; stillnessTimedComm = CommunicationChannelFactory.MakeTimedStillnessChannel() as StillnessTimedCommChannel; //init object mover objectMover = ObjectMover.CreateObjectMover(); playerCurrentCoords = player.MazeCellCoords; //start out not in communcation aiCommState = AICommunicationState.NotInCommuncation; aiAlignmentState = AIAlignmentState.Neutral; //initialize list of possible actions (for each state) InitializeActionLists(); roomsRequestedIn = new Dictionary<IntVector2, bool>(); rng = new System.Random(); }
private void StateTransition(bool responseWasPositive) { numberOfInfractions += (responseWasPositive ? -1 : 1); if (numberOfInfractions <= 2 && numberOfInfractions >= -2) { aiAlignmentState = AIAlignmentState.Neutral; } else if (numberOfInfractions < -2) { if (numberOfInfractions <= -6) { aiAlignmentState = AIAlignmentState.VeryFriendly; SingleHallwayEnding(); } else { aiAlignmentState = AIAlignmentState.Friendly; } } else if (numberOfInfractions > 2) { if (numberOfInfractions >= 6) { aiAlignmentState = AIAlignmentState.VeryHostile; CircleMazeEnding(); } else { aiAlignmentState = AIAlignmentState.Hostile; } } }
private void Start() { //init communcation channels textCommChannel = CommunicationChannelFactory.Make2WayTextChannel() as TextCommunicationChannel; oneWayCommChannel = CommunicationChannelFactory.MakeOneWayTextChannel() as OneWayTextCommunication; roomExitCommChannel = CommunicationChannelFactory.MakeRoomExitPathChannel() as RoomExitPathCommChannel; oneWayTimedComm = CommunicationChannelFactory.MakeOneWayTimedChannel() as OneWayTimedCommChannel; stillnessTimedComm = CommunicationChannelFactory.MakeTimedStillnessChannel() as StillnessTimedCommChannel; //init object mover objectMover = ObjectMover.CreateObjectMover(); playerCurrentCoords = player.MazeCellCoords; //start out not in communcation aiCommState = AICommunicationState.NotInCommuncation; aiAlignmentState = AIAlignmentState.Neutral; //initialize list of possible actions (for each state) InitializeActionLists(); roomsRequestedIn = new Dictionary <IntVector2, bool>(); rng = new System.Random(); }
public GenericTextInterchange(AIAlignmentState state) : base(state) { }
public AiPlayerInterchange(AIAlignmentState state) { aiState = state; expectedResponse = new PlayerResponse(); }
private void CircleMazeEnding() { ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action <Maze>(m => m.GenerateCircleMaze())); aiAlignmentState = AIAlignmentState.VeryHostile; reactToPlayer = true; }
public PathInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange) : base(state, expected, firstInterchange) { }
public PathInterchange(AIAlignmentState state) : base(state) { }
public static string GetEndingMonologue(AIAlignmentState state) { return(GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard")); }
public TouchCornersInterchange(AIAlignmentState state, PlayerResponse response) : base(state, response) { }
public PathInterchange(AIAlignmentState state, PlayerResponse expected) : base(state, expected) { }
public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange) { aiState = state; expectedResponse = expected; isFirst = firstInterchange; }
public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected) { aiState = state; expectedResponse = expected; }
public LockPlayerInRoomInterchange(AIAlignmentState state) : base(state) { }
public StayStillInterchange(AIAlignmentState state) : base(state) { }
private void SingleHallwayEnding() { ResizeMaze(new IntVector2(1, 10), new IntVector2(0, 0)); aiAlignmentState = AIAlignmentState.VeryFriendly; reactToPlayer = true; }
private void CircleMazeEnding() { ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action<Maze>(m => m.GenerateCircleMaze())); aiAlignmentState = AIAlignmentState.VeryHostile; reactToPlayer = true; }
public static string GetEndingMonologue(AIAlignmentState state) { return GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard"); }