// Use this for initialization void Start() { stateModal = StateModal.GetInstance(); scoreModal = ScoreModal.GetInstance(); player1Modal = Player1Modal.GetInstance(); shipSize = new Vector2(30, 30); Vector2 size = new Vector2(120, lineHeight); float posX = Screen.width - (size.x + 20); float posY = lineHeight * 2; highRec = new Rect(new Vector2(posX, posY), size); posY += lineHeight; scoreRec = new Rect(new Vector2(posX, posY), size); posY += lineHeight; highScoreRec = new Rect(new Vector2(posX, posY), size); posY += lineHeight * 2; player1Rec = new Rect(new Vector2(posX, posY), size); posY += lineHeight; player1ScoreRec = new Rect(new Vector2(posX, posY), size); posY += lineHeight * 2; player1ScoreRec = new Rect(new Vector2(posX, posY), size); posY += lineHeight * 2; player1LifeRec = new List <Rect> (); AddShipRects(2, new Vector2(posX, posY)); }
public static Player1Modal GetInstance() { if (player1Modal == null) { player1Modal = new Player1Modal(); } return(player1Modal); }
// Use this for initialization void Start() { stateModal = StateModal.GetInstance(); scoreModal = ScoreModal.GetInstance(); player1Modal = Player1Modal.GetInstance(); startSpeed = enemiesSpeed; }