// Use this for initialization protected void Initialize() { laserFireEvent = new LaserFireEvent(); rb2d = GetComponent <Rigidbody2D> (); ccol2d = GetComponent <CircleCollider2D> (); radius = ccol2d.radius * transform.localScale.x; laserCD = gameObject.AddComponent <Timer> (); }
//GameOverEvent gameOverEvent; // Use this for initialization public void Initialize() { capCol2d = GetComponent <CapsuleCollider2D> (); rb2d = GetComponent <Rigidbody2D> (); direction = new Vector2(1, 0); laserFireEvent = new LaserFireEvent(); damageFalconEvent = new DamageEvent(); //gameOverEvent = new GameOverEvent (); EventManager.AddLaserInvoker(this); }