Beispiel #1
0
 public World()
 {
     setupIslandManager();
     pathingProfile = new WorldPathingProfile(islandManager);
     actorManager   = new ActorManager();
     actorProfile   = new ActorStateProfile(actorManager);
     gameDirector   = new GameDirector();
 }
Beispiel #2
0
        public override Job getJobWhenClicked(Character nWorker, IslandPathingProfile profile, ActorStateProfile actorState)
        {
            IslandGame.GameWorld.CharactersAndAI.CompleteTaskJob getInBoat = new
                                                                             IslandGame.GameWorld.CharactersAndAI.CompleteTaskJob(nWorker, new CharacterTask.GetInBoat(this));

            Path path = new PathHandler().
                        getPathToSingleBlock(profile, new BlockLoc(nWorker.getFootLocation()), profile, new BlockLoc(getFootLocation()), 2);

            TravelAlongPath travel = new TravelAlongPath(path, getInBoat);

            return(travel);
        }
Beispiel #3
0
 public virtual Job getJobWhenClicked(Character nWorker, IslandPathingProfile profile, ActorStateProfile nActorProfile)
 {
     return(new UnemployedJob());
 }
Beispiel #4
0
 public override Job getJobWhenClicked(Character nWorker, IslandPathingProfile pathingProfile, ActorStateProfile actorState)
 {
     if (areHostile(nWorker.getFaction(), getFaction()))
     {
         return(new AttackActorJob(this, pathingProfile, actorState, nWorker));
     }
     else
     {
         return(new UnemployedJob());
     }
 }
Beispiel #5
0
        public void addCharacterAt(Vector3 location, Actor.Faction faction, IslandPathingProfile islandPathingProfile, ActorStateProfile actorStateProfile)
        {
            Character character = new Character(new AxisAlignedBoundingBox(location + new Vector3(), .6f, .6f, 1.8f), faction);

            if (faction == Actor.Faction.enemy)
            {
                character.setJobAndCheckUseability(new AggressiveStanceJob(character));
            }
            actors.Add(character);
        }
Beispiel #6
0
 public AttackActorJob(Actor nTarget, IslandPathingProfile nPathingProfile, ActorStateProfile nActorStateProfile, Character nCharacter)
 {
     target    = nTarget;
     character = nCharacter;
     setJobType(JobType.combat);
 }
Beispiel #7
0
 public WanderAroundJob(IslandPathingProfile nPathingProfile, ActorStateProfile nActorStateProfile, Character nCharacter)
 {
     pathingProfile = nPathingProfile;
     actorProfile   = nActorStateProfile;
     character      = nCharacter;
 }