/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Samples
{
using UnityEngine;
///
/// Rotates the coin.
///
public class Coin : MonoBehaviour
{
[Tooltip("The speed that the coin should rotate.")]
[SerializeField] protected Vector3 m_RotationSpeed;
private Transform m_Transform;
///
/// Initializes the default values.
///
private void Awake()
{
m_Transform = transform;
}
///
/// Updates the Transform rotation.
///
private void Update()
{
m_Transform.rotation *= Quaternion.Euler(m_RotationSpeed * Time.deltaTime);
}
}
}