/// <summary> /// Creates a Turret at the given location, facing the given rotation, /// scaled to the given amount, with the given TurretHead mounted on /// top, and with a collision sphere of the given size. /// </summary> /// <param name="location">Location of the Turret</param> /// <param name="rotation">Rotation the Turret is facing</param> /// <param name="scale">Scale of the Turret</param> /// <param name="head">TurretHead to be placed on top</param> /// <param name="colliderSize">Size of the collison Sphere</param> public Turret(Vector3 location, Vector3 rotation, Vector3 scale, TurretHead head, float colliderSize) : base(location, rotation, scale) { this.head = head; this.colliderSize = colliderSize; this.children.Add(head); this.health = 100f; }
/// <summary> /// Script allows a TurretHead to rotate based on keyboard input at a /// certain speed. /// </summary> /// <param name="turretHead">TurretHead to translate.</param> public TurretHeadRotationScript(TurretHead turretHead) { this.turretHead = turretHead; }