Class Aphid

Direct Known Subclasses:
HealthAphid, ScoreAphid, SpeedAphid, VisibilityAphid

public class Aphid extends Creature
Aphids are Creatures eated by ladybugs. Ant always try to protect them.
Since:
0.1
Version:
2.5
  • Constructor Details

    • Aphid

      public Aphid()
      Main Constructor with all default params: aphid texture, low life points, no hit points, no shoot points, a small visionRadius & a small hit radius.
  • Method Details

    • getGivenPoints

      public int getGivenPoints()
      Overrides:
      getGivenPoints in class Creature
    • getMaxRotationPerSecond

      public float getMaxRotationPerSecond()
      Overrides:
      getMaxRotationPerSecond in class Creature
    • getCreaturesHuntedBy

      public Set<Class<? extends Creature>> getCreaturesHuntedBy()
      Overrides:
      getCreaturesHuntedBy in class Creature
    • getAnimationSpeedMultiplier

      public float getAnimationSpeedMultiplier()
      Overrides:
      getAnimationSpeedMultiplier in class Creature
    • getColor

      public com.badlogic.gdx.graphics.Color getColor()
    • isHoneydewReady

      public boolean isHoneydewReady()
    • getCreaturesFriendly

      public Set<Class<? extends Creature>> getCreaturesFriendly()
      Overrides:
      getCreaturesFriendly in class Creature
    • getCreaturesFriendlyWithVisibility

      public Set<Class<? extends Creature>> getCreaturesFriendlyWithVisibility()
      Overrides:
      getCreaturesFriendlyWithVisibility in class Creature
    • getSpaceActionName

      public String getSpaceActionName()
      Overrides:
      getSpaceActionName in class Creature
    • colorSkeleton

      public void colorSkeleton()
      Color aphid skeleton with aphid color. It color each body part that contains "background" in its name.
    • bonusWhenEaten

      public void bonusWhenEaten(Creature eater)
      Give bonus to eater when aphid is eaten.
      Parameters:
      eater - The creature that eat the aphid.
    • bonusWhenCollectHoneydew

      protected void bonusWhenCollectHoneydew(Creature collector)
      Give bonus to collector when honeydew is collected.
      Parameters:
      collector - The creature that collect the honeydew.
    • updateHonewdewVisibility

      public void updateHonewdewVisibility()
      Update honeydew visibility depending of last collected time.
    • setHoneydewVisibility

      public void setHoneydewVisibility(boolean visible)
      Set honeydew visibility. It set the scale of honeydew bone to 0 or 1.
      Parameters:
      visible - True if honeydew is visible, false otherwise.
    • collectHoneydew

      public void collectHoneydew(Creature collector)
      Collect honeydew of this. It set lastCollectedTime to current time and give bonus to collector.