No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.
|
- using System;
- using System.Collections.Generic;
- using UnityEngine;
-
- namespace coa4u
- {
- /// <summary>
- /// Instantly rotates the target.
- /// </summary>
- class ActionSetRotation : ActionInstant
- {
- protected Vector3 value;
-
- public ActionSetRotation(Vector3 targetValue)
- : base()
- {
- value = targetValue;
- }
-
- public ActionSetRotation(float angle)
- : this(new Vector3(0, 0, angle))
- {
- locks = Axises.rxy;
- }
-
- public override ActionInstant Clone()
- {
- return new ActionSetRotation(value);
- }
-
- public override void Start()
- {
- base.Start();
- if (locks != Axises.none)
- LockAxises(ref value);
- transform.rotation = Quaternion.Euler(value);
- }
- }
- }
|