Пример #1
0
 private void Awake()
 {
     collisionArea  = this.GetComponent <CapsuleCollider2D>();
     activPow       = GetComponent <ActivatePowerUpRed>();
     activPowPurple = GetComponent <ActivatePowerUpPurple>();
     purple         = GetComponent <PowerUpPurple>();
 }
Пример #2
0
 void Awake()
 {
     width         = image.rectTransform.sizeDelta.x;
     originalWidth = width;
     // Cogemos los scripts de los Powerups
     red            = GetComponent <PowerUpRed>();
     blue           = GetComponent <PowerUpBlue>();
     green          = GetComponent <PowerUpGreen>();
     purple         = GetComponent <PowerUpPurple>();
     yellow         = GetComponent <PowerUpYellow>();
     activPowPurple = GetComponent <ActivatePowerUpPurple>();
     // Cogemos el sprite de la espada para poder cambiarlo de color luego
     neonSword = GetComponentsInChildren <SpriteRenderer>();
 }