Exemple #1
0
    bool VisitPassengerBuilding(string type_name, int start_state, int new_exit_state)
    {
        visitBuilding = BuildingList.GetPassengerBuilding(this, type_name);

        if (visitBuilding == null)
        {
            return(false);
        }
        else
        {
            //finalDestination = visitBuilding.GetEnterQueuePosition(); DISABLED FOR PASSENGER BUILDING
            steering.Visit(finalDestination);
            state_passenger_building = start_state;
            exit_state = new_exit_state;

            // don't forget to remove eventual message
            speechBubbleController.RemoveMessageImmediate(this);

            return(true);
        }
    }
Exemple #2
0
    bool VisitBuilding(string type_name, int _exit_state)
    {
        // get building
        buildingPassenger = (BuildingPassenger)BuildingList.GetPassengerBuilding(this, type_name);

        if (buildingPassenger == null)
        {
            print("could not find building)");
            return(false);
        }
        else
        {
            behaviour        = buildingPassenger.VisitBuilding(this);
            finalDestination = behaviour.GetEntrancePosition();
            steering.Visit(finalDestination);
            state_passenger   = STATE_BUILDING_GOTO;
            buildingExitState = _exit_state;

            // don't forget to remove eventual message
            speechBubbleController.RemoveMessageImmediate(this);
            return(true);
        }
    }