mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-14 17:09:31 +07:00
IsoWorld static instance
This commit is contained in:
@@ -10,6 +10,8 @@ namespace IsoTools {
|
||||
[ExecuteInEditMode, DisallowMultipleComponent]
|
||||
public class IsoWorld : MonoBehaviour {
|
||||
|
||||
static IsoWorld _instance = null;
|
||||
|
||||
bool _dirty = false;
|
||||
IsoAssocList<IsoObject> _objects = new IsoAssocList<IsoObject>();
|
||||
IsoAssocList<IsoObject> _visibles = new IsoAssocList<IsoObject>();
|
||||
@@ -129,6 +131,21 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Instance
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public static IsoWorld Instance {
|
||||
get {
|
||||
if ( !_instance ) {
|
||||
_instance = GameObject.FindObjectOfType<IsoWorld>();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// IsoToScreen/ScreenToIso
|
||||
|
||||
Reference in New Issue
Block a user