private void Start()
 {
     text        = GetComponent <TMPro.TextMeshProUGUI>();
     gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
     gameManager.listenStart(this, "enable");
     gameManager.listenEnd(this, "disable");
 }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
     countDown    = GameObject.Find("Tme Text").GetComponent <CountDown>();
     button       = GetComponent <Button>();
     button.onClick.AddListener(SetDifficulty);
 }
示例#3
0
 void Start()
 {
     rb                 = GetComponent <Rigidbody>();
     managerX           = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
     transform.position = RandomSpawnPosition();
     StartCoroutine(RemoveObjectRoutine());
 }
    private float spaceBetweenSquares = 2.5f;   // the distance between the centers of squares on the game board


    void Start()
    {
        //rb = GetComponent<Rigidbody>();
        gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();

        transform.position = RandomSpawnPosition();
        StartCoroutine(RemoveObjectRoutine()); // begin timer before target leaves screen
    }
 // Start is called before the first frame update
 void Start()
 {
     //for calling compoenents/ setting integers and calling methods
     rb    = GetComponent <Rigidbody>();
     point = 0;
     SetPointText();
     gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
 }
示例#6
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
示例#7
0
    // Start is called before the first frame update
    void Start()
    {
        currentHealth = maxHealth;
        healthManager.SetMaxHealth(maxHealth);

        playerRb         = GetComponent <Rigidbody>();
        Physics.gravity *= gravityModifier;

        playerAnim = GetComponent <Animator>();

        playerAudio = GetComponent <AudioSource>();

        gameManagerController = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
    }
示例#8
0
 // Start is called before the first frame update
 void Start()
 {
     gameManagerController = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
 }
示例#9
0
 // Start is called before the first frame update
 void Start()
 {
     button = GetComponent <Button>();
     button.onClick.AddListener(SetDifficulty);
     gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
 }
    // Start is called before the first frame update

    void Start()
    {
        gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
        timeLeft     = 60;
    }
示例#11
0
 // Start is called before the first frame update
 void Start()
 {
     gameManagerController = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
     startPos    = transform.position;
     repeatWidth = GetComponent <BoxCollider>().size.x / 2;
 }
示例#12
0
 private void Awake()
 {
     gameManager = FindObjectOfType <GameManagerX>();
     timerText   = GetComponent <TextMeshProUGUI>();
 }
    public int difficulty;// this is for dividing the diffculty of the moods

    // Start is called before the first frame update
    void Start()
    {
        gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
        button       = GetComponent <Button>();
        button.onClick.AddListener(SetDifficulty); // listens when we click on the buttons
    }
示例#14
0
 public void StartTimer()
 {
     gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>();
     StartCoroutine("LoseTime");
     Time.timeScale = 1;
 }