Beispiel #1
0
 private void Awake()
 {
     outOfBound            = gameObject.AddComponent <OutOfBound>();
     rb                    = GetComponent <Rigidbody2D>();
     trailRenderer         = GetComponent <TrailRenderer>();
     particle              = gameObject.AddComponent <Particle>();
     particle.ParticleName = hitEffekt;
 }
Beispiel #2
0
 private void Awake()
 {
     rb                 = GetComponent <Rigidbody2D>();
     outOfBound         = gameObject.AddComponent <OutOfBound>();
     health             = gameObject.AddComponent <Health>();
     health.startHealth = hitsToDeath;
     health.blinkColor  = blinkColor;
     GetComponent <SpriteRenderer>().color = startColor;
     SetRandomSize(3f, 4f);
     particle = GetComponent <Particle>();
     particle.ParticleName = "Explotion Variant";
 }
Beispiel #3
0
 void Start()
 {
     oob      = GameObject.FindGameObjectWithTag("OOB").GetComponent <OutOfBound>();
     timeLeft = minute * 60 + second;
 }