Class Faction


  • public class Faction
    extends java.lang.Object
    Represents a faction contains data largely sourced from GameSettings
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int id  
    • Constructor Summary

      Constructors 
      Constructor Description
      Faction()  
      Faction​(java.lang.String name, java.lang.String colour, com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.math.Vector2 spawn, int id)
      Creates a faction with the specified name, colour, and in-game location.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getColour()  
      java.lang.String getName()  
      com.badlogic.gdx.math.Vector2 getPosition()  
      com.badlogic.gdx.math.Vector2 getSpawnPos()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        public int id
    • Constructor Detail

      • Faction

        public Faction()
      • Faction

        public Faction​(java.lang.String name,
                       java.lang.String colour,
                       com.badlogic.gdx.math.Vector2 pos,
                       com.badlogic.gdx.math.Vector2 spawn,
                       int id)
        Creates a faction with the specified name, colour, and in-game location.
        Parameters:
        name - name of faction
        colour - colour name (used as prefix to retrieve ship sprites)
        pos - 2D vector location
    • Method Detail

      • getName

        public java.lang.String getName()
      • getColour

        public java.lang.String getColour()
      • getPosition

        public com.badlogic.gdx.math.Vector2 getPosition()
      • getSpawnPos

        public com.badlogic.gdx.math.Vector2 getSpawnPos()