void makeInstace()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#2
0
 void Start()
 {
     if (player == null)
     {
         player = GameObject.Find("character").GetComponent <characterController>();
     }
     gamePlayController = GameObject.Find("GameplayController").GetComponent <gamePlayController>();
 }
示例#3
0
    private void Start()
    {
        playerStatus ps = new playerStatus();

        // fileManager.savePlayerStatus(ps);
        instance = this;

        updateCoinUI(0);
        updateScoreUI(0);

        resetPlayerStatus();
    }
示例#4
0
 void Start()
 {
     charTransform      = this.transform;
     gamePlayController = GameObject.Find("GameplayController").GetComponent <gamePlayController>();
 }
示例#5
0
 void Awake()
 {
     _gamePlayController = Object.FindObjectOfType <gamePlayController>();
     anim = this.GetComponent <Animator>();
     anim.SetInteger("typeAnim", level);
 }
 void OnDisable()
 {
     SceneManager.sceneLoaded -= onSceneLoaded;
     instance = null;
 }
示例#7
0
 void Start()
 {
     gamePlayController = GameObject.Find("GameplayController").GetComponent <gamePlayController>();
     sound = gameObject.GetComponent <AudioSource>();
 }