예제 #1
0
    void Start()
    {
        //BGM
        soundManager.Instance.StopBgm();
        soundManager.Instance.ChangeBgm(1);

        goText.SetActive(false);
        finishText.SetActive(false);

        submarinePoint = 0;

        shipPoint = 0;

        frameCnt = 0;

        gameTime = gameStartTime;

        gameTimeText.color = new Color(255.0f, 255.0f, 255.0f, 0.0f);

        //ミサイルの生成時間の最大値を決める
        createMissileTimeMax = (int)gameTime * 60 / missileNumMax;

        isCreateMissile = false;

        winner = WINNER.WINNER_NOTHING;

        gamePhase = PHASE.PHASE_START;

        shipController      = ship.GetComponent <ShipController>();
        trashCount          = GameObject.Find("Sea Floor").GetComponent <TrashCount>();
        submarineController = submarine.GetComponent <SubmarineController>();
    }
예제 #2
0
 private void GameJudge()
 {
     if (submarinePoint > trueShipPoint)
     {
         winner = WINNER.WINNER_SUBMARINE;
     }
     else if (submarinePoint < trueShipPoint)
     {
         winner = WINNER.WINNER_SHIP;
     }
     else
     {
         winner = WINNER.WINNER_NOTHING;
     }
 }