public override void Initialize(float speed, float damage, float lifetime, Vector3 position, Vector3 direction, Parts parent) { base.Initialize(speed, damage, lifetime, position, direction, parent); this.Speed = speed; this.Damage = damage; this.LifeTime = lifetime; tf.position = position; tf.rotation = Quaternion.FromToRotation(Vector3.forward, direction); tf.Rotate(new Vector3(-90, 0, 0)); this.Direction = direction; }
public override void Initialize(float speed, float damage, float lifetime, Vector3 position, Vector3 direction, Parts parent) { base.Initialize(speed, damage, lifetime, position, direction, parent); Speed = speed; Damage = damage; LifeTime = lifetime; tf.position = position; Direction = direction; collider = GetComponent<SphereCollider>(); particletf = tf.FindChild("Particle System").transform; particle = particletf.GetComponent<ParticleSystem>(); }
public override void Initialize(float speed, float damage, float lifetime, Vector3 position, Vector3 direction, Parts parent) { base.Initialize(speed, damage, lifetime, position, direction, parent); this.Speed = speed; this.Damage = damage; this.LifeTime = lifetime; tf.position = position; //tf.rotation = Quaternion.FromToRotation(Vector3.forward, Direction); tf.rotation = parent.transform.rotation; this.Direction = direction; ps.emissionRate = this.Speed * 200 > 2000 ? 2000 : this.Speed * 200; relativeSpeed = this.Speed - parent.Parent.GetComponent<PlayerController>().Speed; }
public override void Initialize(float speed, float damage, float lifetime, Vector3 position, Vector3 Direction, Parts parent) { base.Initialize(speed, damage, lifetime, position, Direction, parent); }