public static ClickIcon Get(GameObject obj = null) { ClickIcon component = obj.GetComponent <ClickIcon>(); if (component == null) { obj.AddComponent <ClickIcon>(); } return(obj.GetComponent <ClickIcon>()); }
public void DrawMoveFlag() { if (this.targetIcon != null) { this.targetIcon.Raw.position = this.GroundPoint + new Vector3(0f, 0.1f, 0f); } else if (this.targetIconBackup != null) { this.targetIcon = this.targetIconBackup; this.targetIcon.Raw.position = this.groundPoint + new Vector3(0f, 0.1f, 0f); this.targetIconBackup = null; } else { this.targetIcon = MapManager.Instance.SpawnResourceHandle("MouseClick", this.groundPoint + new Vector3(0f, 0.1f, 0f), Quaternion.LookRotation(Vector3.forward), 0); } if (this.targetIcon != null) { ClickIcon.Get(this.targetIcon.Raw.gameObject).Init(ClickIconType.MouseClick); } }
public void ClearBattleResouces() { ClickIcon.Clear(); SurfaceManager.ClearResources(); ModelAnimation.ClearData(); BaseAction.ClearResources(); this.ClearDynamicDrawerResources(); ResourceManager.ClearResources(); GameObject gameObject = GameObject.Find("SpawnerPool(Clone)"); if (gameObject != null) { PoolRoot component = gameObject.GetComponent <PoolRoot>(); if (component != null) { component.ClearResources(); } } this.ClearBattleSceneResources(false); Resources.UnloadUnusedAssets(); }
void Awake() { Instance = this; }