Package com.mygdx.game
Class Faction
- java.lang.Object
 - 
- com.mygdx.game.Faction
 
 
- 
public class Faction extends java.lang.ObjectRepresents a faction contains data largly sourced from GameSettings 
- 
- 
Field Summary
Fields Modifier and Type Field Description intid 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetColour()intgetID()Added for Assessment 2java.lang.StringgetName()com.badlogic.gdx.math.Vector2getPosition()com.badlogic.gdx.math.Vector2getSpawnPos() 
 - 
 
- 
- 
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 factioncolour- colour name (used as prefix to retrieve ship sprites)pos- 2D vector location
 
 - 
 
- 
Method Detail
- 
getName
public java.lang.String getName()
- Returns:
 - The name of this Faction
 
 
- 
getID
public int getID()
Added for Assessment 2- Returns:
 - the ID associated with this faction
 
 
- 
getColour
public java.lang.String getColour()
- Returns:
 - The colour of this Faction
 
 
- 
getPosition
public com.badlogic.gdx.math.Vector2 getPosition()
- Returns:
 - The position of this Faction
 
 
- 
getSpawnPos
public com.badlogic.gdx.math.Vector2 getSpawnPos()
- Returns:
 - The spawn position of this Faction
 
 
 - 
 
 -