2019-07-13 18:35:24 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
using SanAndreasUnity.UI;
|
|
|
|
|
using SanAndreasUnity.Behaviours.Vehicles;
|
|
|
|
|
using SanAndreasUnity.Utilities;
|
|
|
|
|
|
|
|
|
|
namespace SanAndreasUnity.Behaviours
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class Vehicle2Minimap : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Vehicle m_vehicle;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
// use Start(), because vehicle script is dynamically added to game object
|
|
|
|
|
m_vehicle = this.GetComponentOrThrow<Vehicle>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnEnable()
|
|
|
|
|
{
|
|
|
|
|
UI.MapWindow.Instance.onDrawMapItems += OnMinimapGUI;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnDisable()
|
|
|
|
|
{
|
|
|
|
|
UI.MapWindow.Instance.onDrawMapItems -= OnMinimapGUI;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnMinimapGUI()
|
|
|
|
|
{
|
|
|
|
|
if (null == m_vehicle)
|
|
|
|
|
return;
|
|
|
|
|
|
2019-07-13 21:54:02 +00:00
|
|
|
|
//MapWindow.Instance.DrawItemOnMap( MiniMap.Instance.VehicleTexture, m_vehicle.transform.position, 12 );
|
2019-07-13 18:35:24 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|