Class NPCFollowing

java.lang.Object
games.stendhal.server.entity.npc.interaction.NPCFollowing
All Implemented Interfaces:
Observer

public final class NPCFollowing extends Object implements Observer
class for make one npc follower of other.
Author:
yoriy
  • Constructor Details

    • NPCFollowing

      public NPCFollowing(SpeakerNPC leader, SpeakerNPC follower, Observer finish)
      constructor
      Parameters:
      leader - - NPC for follow him.
      follower - - follower of leader.
      finish - - code to continue after follower meet leader.
  • Method Details

    • update

      public void update(Observable o, Object arg)
      Specified by:
      update in interface Observer
    • getOneThirdOfPath

      public FixedPath getOneThirdOfPath(FixedPath path)
      return 1/3 of follower's path
      Parameters:
      path -
      Returns:
      - a part of path