//Start is already being called in Base PhysicsObject Class private void Awake() { anim = GetComponent <Animator>(); render = GetComponent <SpriteRenderer>(); heartBeatPower = Power; //might be redundent, but get the heartbeat power if (maxHealth < 1) { maxHealth = 1; } //must have at leath one health point if (health < 0) { health = maxHealth; } SetReturnPosition(transform.position); //set the return position to 1 unit above where the player initially spawned if (startPosition != Vector2.one) { transform.position = startPosition; } audioPlayer = GetComponent <AudioPlayer>(); }
protected virtual void Awake() { part = GetComponent <ParticleSystem>(); partRend = GetComponent <ParticleSystemRenderer>(); particles = new ParticleSystem.Particle[part.main.maxParticles]; hbPower = Player.GetComponent <IPlayer>().Power; part.Stop(); }