You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
494 B
21 lines
494 B
using UnityEngine; |
|
using UnityEngine.UI; |
|
using UniRx; |
|
|
|
public class MiniMapController : MonoBehaviour |
|
{ |
|
private float RotZ = 0f; |
|
public Image Direction; |
|
|
|
private void Start() |
|
{ |
|
Observable.EveryLateUpdate() |
|
.Subscribe(_ => |
|
{ |
|
|
|
RotZ = transform.eulerAngles.y + AssetManager.Instance.InitialAngle; |
|
Direction.transform.eulerAngles = new Vector3(0, 0, RotZ); |
|
|
|
}).AddTo(gameObject); |
|
} |
|
}
|
|
|