// Use this for initialization void Start() { alive = true; grabbed = false; silent = true; canFire = false; enemyRigidbody = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); forceToApply.Set(0, 0); touchWorldPos.Set(0, 0, 0); enemyRigidbody.gravityScale = gravScale; lastYVelocity = 0f; maxHitpoints = hitpoints; anim.SetBool("Grounded", true); anim.SetBool("Dead", false); splatParticleEmitter = GetComponent <ParticleSystem>(); enemyCollider = gameObject.GetComponent <Collider2D>(); if (isShooter == true) { projectilePool = GameObject.Find("Enemy Projectile Pool").GetComponent <ObjectPoolingGeneric>(); } }
// Use this for initialization void Awake() { current = this; }