コード例 #1
0
    // 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));
    }
コード例 #2
0
 public static Player1Modal GetInstance()
 {
     if (player1Modal == null)
     {
         player1Modal = new Player1Modal();
     }
     return(player1Modal);
 }
コード例 #3
0
ファイル: GamePlay.cs プロジェクト: MizzKii/galaga
    // Use this for initialization
    void Start()
    {
        stateModal   = StateModal.GetInstance();
        scoreModal   = ScoreModal.GetInstance();
        player1Modal = Player1Modal.GetInstance();

        startSpeed = enemiesSpeed;
    }