コード例 #1
0
    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();
    }
コード例 #2
0
 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;
         }
     }
 }
コード例 #3
0
    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();
    }
コード例 #4
0
 public GenericTextInterchange(AIAlignmentState state) : base(state) { }
コード例 #5
0
 public AiPlayerInterchange(AIAlignmentState state) {
     aiState = state;
     expectedResponse = new PlayerResponse();
 }
コード例 #6
0
 public AiPlayerInterchange(AIAlignmentState state)
 {
     aiState          = state;
     expectedResponse = new PlayerResponse();
 }
コード例 #7
0
 private void CircleMazeEnding()
 {
     ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action <Maze>(m => m.GenerateCircleMaze()));
     aiAlignmentState = AIAlignmentState.VeryHostile;
     reactToPlayer    = true;
 }
コード例 #8
0
 public GenericTextInterchange(AIAlignmentState state) : base(state)
 {
 }
コード例 #9
0
 public PathInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
     : base(state, expected, firstInterchange) {   }
コード例 #10
0
 public PathInterchange(AIAlignmentState state) : base(state) {   }
コード例 #11
0
 public static string GetEndingMonologue(AIAlignmentState state)
 {
     return(GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard"));
 }
コード例 #12
0
 public TouchCornersInterchange(AIAlignmentState state, PlayerResponse response) : base(state, response)
 {
 }
コード例 #13
0
 public PathInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
     : base(state, expected, firstInterchange)
 {
 }
コード例 #14
0
 public PathInterchange(AIAlignmentState state, PlayerResponse expected) : base(state, expected)
 {
 }
コード例 #15
0
 public PathInterchange(AIAlignmentState state) : base(state)
 {
 }
コード例 #16
0
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
 {
     aiState          = state;
     expectedResponse = expected;
     isFirst          = firstInterchange;
 }
コード例 #17
0
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected)
 {
     aiState          = state;
     expectedResponse = expected;
 }
コード例 #18
0
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected) {
     aiState = state;
     expectedResponse = expected;
 }
コード例 #19
0
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange) {
     aiState = state;
     expectedResponse = expected;
     isFirst = firstInterchange;
 }
コード例 #20
0
 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;
         }
     }
     
 }
コード例 #21
0
 public PathInterchange(AIAlignmentState state, PlayerResponse expected) : base(state, expected) {   }
コード例 #22
0
 public LockPlayerInRoomInterchange(AIAlignmentState state) : base(state) {  }
コード例 #23
0
 public TouchCornersInterchange(AIAlignmentState state, PlayerResponse response) : base(state, response) {   }
コード例 #24
0
 public StayStillInterchange(AIAlignmentState state) : base(state)
 {
 }
コード例 #25
0
 private void SingleHallwayEnding() {
     ResizeMaze(new IntVector2(1, 10), new IntVector2(0, 0));
     aiAlignmentState = AIAlignmentState.VeryFriendly;
     reactToPlayer = true;
 }
コード例 #26
0
 private void CircleMazeEnding() {
     ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action<Maze>(m => m.GenerateCircleMaze()));
     aiAlignmentState = AIAlignmentState.VeryHostile;
     reactToPlayer = true;
 }
コード例 #27
0
 private void SingleHallwayEnding()
 {
     ResizeMaze(new IntVector2(1, 10), new IntVector2(0, 0));
     aiAlignmentState = AIAlignmentState.VeryFriendly;
     reactToPlayer    = true;
 }
コード例 #28
0
 public StayStillInterchange(AIAlignmentState state) : base(state) { }
コード例 #29
0
 public static string GetEndingMonologue(AIAlignmentState state) {
     return GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard");
 }
コード例 #30
0
 public LockPlayerInRoomInterchange(AIAlignmentState state) : base(state)
 {
 }