コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     scoreboard  = FindObjectOfType <GameUIDisplay>();
     score       = scoreboard.Score;
     patronsLeft = scoreboard.PatronsLeft;
     patronsSat  = scoreboard.PatronsSat;
     Destroy(scoreboard);
     Destroy(scoreboard.gameObject);
     xPos                   = Camera.main.WorldToScreenPoint(displayBoard.gameObject.transform.position).x;
     yPos                   = Screen.height - Camera.main.WorldToScreenPoint(displayBoard.gameObject.transform.position).y;
     style                  = new GUIStyle();
     style.fontSize         = 35;
     style.normal.textColor = Color.white;
 }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        pos             = this.transform.position;
        pauseMenu       = FindObjectOfType <PauseTest>();
        onboard         = FindObjectOfType <Onboarding>();
        soundEffect     = GetComponent <AudioSource>();
        scoreboard      = FindObjectOfType <GameUIDisplay>();
        grid            = FindObjectOfType <Grid>();
        levelManager    = FindObjectOfType <LevelManager>();
        moveableManager = GameObject.Find("MoveableManager");
        // Carson Code
        // Call move every .3s
        InvokeRepeating("move", 0.0f, 0.15f); //This is in start but will run every .3s


        //Seating initialization
        numberOfTables = moveableManager.GetComponent <MoveableManager>().tables.Count; //Set the number of tables in the level
        inSeat         = false;
        seat           = null;
    }