// Use this for initialization protected virtual void Start() { rigidBody = GetComponent <Rigidbody2D>(); rigidBody.mass = massMultiplier * (Mathf.PI * Mathf.Pow((transform.localScale.x / 2), 2)); maxHealth = health; this.cellInfo = gameObject.AddComponent(typeof(UICellInfo)) as UICellInfo; }
// Use this for initialization void Start() { singleShot = new SoundFile[1]; singleShot[0] = SoundFile.singleShotSound; chargeShot = new SoundFile[1]; chargeShot[0] = SoundFile.chargedShotSound; cytoMountPoint = GameObject.FindGameObjectWithTag("arrow"); rb2d = GetComponent <Rigidbody2D>(); normalScale = transform.localScale; lastFireTime = Time.time; //timer components powerupTimer = gameObject.AddComponent <Timer>(); // this.playerInfo = gameObject.AddComponent(typeof(UICellInfo)) as UICellInfo; // bubble jet bubbles = GameObject.FindGameObjectWithTag("bubbles").GetComponent <ParticleSystem>(); }