Пример #1
0
 // Use this for initialization
 void Start()
 {
     healthandDamage = GameObject.FindGameObjectWithTag("Player").GetComponent <HealthandDamage>();
     isreset         = false;
     v = 1f;
     if (fireTrigger != null)
     {
         fireTrigger.SetActive(false);
     }
     StartCoroutine(FlameTimer());
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     rb               = GetComponent <Rigidbody>();
     audioSource      = GetComponent <AudioSource>();
     healthandDamage  = GetComponent <HealthandDamage>();
     speed            = 5;
     playOnce         = false;
     speedIncrease    = false;
     speedDecrease    = false;
     touchGround      = true;
     displayCount     = 0;
     displayScore     = 0;
     countText.text   = displayCount.ToString() + " Diamonds";
     scoreText.text   = "Score: " + displayScore.ToString();
     maxCount         = 33;
     wintriggerObject = GameObject.FindGameObjectWithTag("Win");
     winTrigger       = wintriggerObject.GetComponent <WinScript>();
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     healthandDamage = gameObject.GetComponent <HealthandDamage>();
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     healthandDamage = GameObject.FindGameObjectWithTag("Player").GetComponent <HealthandDamage>();
 }