Exemplo n.º 1
0
 private void Awake()
 {
     //Get all the interfaces the input will be interacting with
     movable   = GetComponent <IMovable>();
     rotable   = GetComponent <IRotable>();
     shootable = GetComponent <IShootable>();
 }
        public RotationCloneControl(ISceneObject cloned)
        {
            if (!(cloned is IRotable))
            {
                throw new ArgumentException("RotationCloneControl must clone an IRotable object");
            }

            this.cloned = cloned as IRotable;
        }
Exemplo n.º 3
0
        protected override void InitControl(ISceneObject obj)
        {
            if (!(obj is IRotable))
            {
                Logger.Error("LinearRotationControl cannot be attached to non-rotable object!");
                return;
            }

            meRotable = obj as IRotable;
        }
Exemplo n.º 4
0
 public static void SetEulerAngles(this IRotable o, Euler orientation)
 {
     o.LocalRotation = orientation.ToMatrix();
 }
Exemplo n.º 5
0
 public static Euler GetEulerAngles(this IRotable o)
 {
     return(Euler.FromMatrix(o.LocalRotation));
 }