コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Collider selfCollider = gameObject.AddComponent <BoxCollider>();

        selfCollider.isTrigger = false;
        // find the score board instance
        sb = FindObjectOfType <scoreBoard>();
    }
コード例 #2
0
 void Awake()
 {
     objInLevel = new List <GameObject>();
     DontDestroyOnLoad(transform.gameObject);
     loadLevelFunc();
     board = GetComponent <scoreBoard>();
     /*RenderSettings.skybox = startSkyBox; */
 }
コード例 #3
0
    public void zapisSkore()
    {
        jmeno = jmenoText.text;
        sc    = new scoreBoard();
        sc.loadScoreSimple();
        sc.addScore(jmeno, gameControll.score);
        sc.saveScore();

        Application.LoadLevel("scoreboard");
    }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     deathFX.SetActive(false);
     sb = FindObjectOfType <scoreBoard>();
 }
コード例 #5
0
    void Start()
    {
        instance = this;

        leftplayerScore = rightplayerScore = 0; //both player start with 0 as score
    }