Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        gameManagerObject = GameObject.Find("GameManager");

        mainGameManagerScript = gameManagerObject.GetComponent <GameManagerMain>();

        gameStatusEnum = gameManagerObject.GetComponent <GameStatusEnum>();

        smoothMoveBodyScript = playerBody.GetComponent <SmoothMoveBody>();

        playerOnBoatScript = this.gameObject.GetComponent <PlayerOnBoat>();
    }
    // Start is called before the first frame update
    void Start()
    {
        mainDataScript          = GameObject.Find("PlayerData").GetComponent <MainData>();
        gameStatusEnum          = GameObject.Find("GameManager").GetComponent <GameStatusEnum>();
        scoreCount              = GameObject.Find("GameManager").GetComponent <ScoreCount>();
        topScoreScript          = this.gameObject.GetComponent <UI_TopScore>();
        barrierStartSpawnScript = GameObject.Find("BarrierSpawnManager").GetComponent <BarrierStartSpawn>();

        startPlayerPosition = playerNextPosition.transform.position; //positionAt start

        touchInputScript = inputHolder.GetComponent <TouchInput>();

        mainGameManagerScript = this.gameObject.GetComponent <GameManagerMain>();
    }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        if (gm == null)
        {
            gm = this;
        }
        ChooseCar.SetActive(false);
        state    = GameState.Playing;
        Money    = 1000;
        LeftTime = 60;

        for (int i = 0; i < 5; i++)
        {
            temp[i] = 0;
        }
    }
Beispiel #4
0
 // Start is called before the first frame update
 private void Awake()
 {
     gameManagerMain = this;
 }
 private void Start()
 {
     Instance = this;
 }