Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i je sklonować, ale nie możesz do niego przepychać zmian lub otwierać zgłoszeń/Pull Requestów.
|
- 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 tgtValue)
- : base()
- {
- value = tgtValue;
- }
-
- public ActionSetRotation(float angle)
- : this(new Vector3(0, 0, angle))
- {
- is2d = true;
- }
-
- /// <summary>
- /// Returns a copy of the action.
- /// </summary>
- public override ActionInstant clone()
- {
- return new ActionSetRotation(value);
- }
-
- /// <summary>
- /// This method is called at the action start.
- /// </summary>
- public override void start()
- {
- base.start();
- transform.rotation = Quaternion.Euler(value);
- }
- }
- }
|