Ejemplo n.º 1
0
        void Start()
        {
            mainGameScript   = FindObjectOfType <MainGameScript>();
            playerGameScript = FindObjectOfType <PlayerGameScript>();

            virtualCamera = GetComponent <CinemachineVirtualCamera>();
        }
Ejemplo n.º 2
0
 void OnCollisionStay2D(Collision2D other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         currentPlayer = other.gameObject.GetComponent <PlayerGameScript>();
     }
 }
Ejemplo n.º 3
0
 void OnCollisionExit2D(Collision2D other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         if (other.gameObject == currentPlayer.gameObject)
         {
             currentPlayer = null;
         }
     }
 }
Ejemplo n.º 4
0
        void Start()
        {
            playerGameScript = FindObjectOfType <PlayerGameScript>();
            infoPanel        = FindObjectOfType <InfoPanel>();
            sellingPanel     = FindObjectOfType <SellingPanel>();
            mainMenu         = FindObjectOfType <MainMenu>();
            audioPlayer      = FindObjectOfType <AudioPlayer>();

            gameState = GameState.Menu;

            fishingTimeLeft   = fishingTime;
            currentFishSchool = null;

            tutorialProgress = 0;
            endOfDayDone     = false;

            currentDay = 0;
            money      = 0;

            highScore = PlayerPrefs.GetInt("HighScore", 0);

            audioPlayer.StartAmbiance();
        }
Ejemplo n.º 5
0
        void Start()
        {
            currentPlayer = null;

            weight = Random.Range(0.2f, 1.0f);
        }