示例#1
0
 public void Setup()
 {
     D.onDLog += Console.WriteLine;
     WorldTestHelper.GenerateInitData();
     InitialSaveFileCreator i = new InitialSaveFileCreator();
     _world = new World(i.CreateRelay("../InitData1/"));
     _adam = _world.tingRunner.GetTing<Character>("Adam");
     _seat = _world.tingRunner.CreateTing<Seat>("Chair", new WorldCoordinate("Eden", 0, 3));
 }
示例#2
0
        public void Sit(Seat pSeat)
        {
            if(pSeat == null) {
                D.LogError(name + " is trying to sit on pOtherTing that is null");
                return;
            }

            if(seat == null) {
                seat = pSeat;
            }

            //D.Log("Sit called for " + name + " on seat " + pSeat);

            direction = pSeat.direction;
            position = pSeat.position;
            StopAction();
            sitting = true;

            var possibleComputerTile = room.GetTile(seat.computerPoint);
            if (possibleComputerTile != null) {
                var computerInFrontOfChair = possibleComputerTile.GetOccupantOfType<Computer>();
                if (computerInFrontOfChair != null) {
                    if (rememberToHackComputerAfterSittingDown) {
                        Hack (computerInFrontOfChair);
                    } else {
                        InteractWith (computerInFrontOfChair);
                    }
                }
            }
        }