12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value.
- using UnityEngine;
- namespace Animancer.Examples.Jobs
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [AddComponentMenu(Strings.ExamplesMenuPrefix + "Jobs - Simple Lean")]
- [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(Jobs) + "/" + nameof(SimpleLeanComponent))]
- public sealed class SimpleLeanComponent : MonoBehaviour
- {
-
-
-
- [SerializeField]
- private AnimancerComponent _Animancer;
- private SimpleLean _Lean;
- private void Awake()
- {
- _Lean = new SimpleLean(_Animancer.Playable);
- }
-
-
-
-
- public float Angle
- {
- get => _Lean.Angle;
- set => _Lean.Angle = value;
- }
-
- [SerializeField]
- private Transform _Axis;
- private void Update()
- {
- _Lean.Axis = _Axis.forward;
- }
-
- }
- }
|