Created TurretController, which performs basic combat for fixed orbital installations Projectiles self-destruct at maximum range Created turret prefab Outfitted turret in game manager Entity position is now 3D Entities responsible for updating their own position and orientation Barrel positions and orientations available from entity code Inventory code will display modal dialog for invalid item moves instead of breaking Yaw articulation working (full 360 rotation still borked)
15 lines
291 B
C#
15 lines
291 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Rotate : MonoBehaviour
|
|
{
|
|
public Vector3 Axis;
|
|
|
|
public float Speed;
|
|
|
|
void Update()
|
|
{
|
|
transform.localRotation *= Quaternion.AngleAxis(Speed * Time.deltaTime, Axis);
|
|
}
|
|
}
|