public void InitArrow(StatSum statsum, Vector3 target, float _speed, Firearm _firearm) { // Debug.Log(this.gameObject.GetInstanceID() + " BORN\n"); if (_speed > 0) { speed = _speed; } type = (arrow_type == ArrowType.RapidFire) ? statsum.clone() : statsum; if (rb == null) { rb = GetComponent <Rigidbody2D> (); } if (init_mass == -1) { init_mass = rb.mass; } if (statsum.runetype == RuneType.Sensible) { rb.mass = init_mass * type.getPrimary(); } alive = true; myStaticTarget = target; myFirearm = _firearm; if (my_peripheral == null) { my_peripheral = Peripheral.Instance; } Color c = sprite_renderer.color; c.a = 1f; sprite_renderer.color = c; if (arrow_type == ArrowType.Sparkle) { lifetime = 3f; //meh } if (diffuse != null) { statsum.factor = diffuse.Init(statsum); } }