Ejemplo n.º 1
0
    public static ClickIcon Get(GameObject obj = null)
    {
        ClickIcon component = obj.GetComponent <ClickIcon>();

        if (component == null)
        {
            obj.AddComponent <ClickIcon>();
        }
        return(obj.GetComponent <ClickIcon>());
    }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
    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();
    }
Ejemplo n.º 4
0
 void Awake()
 {
     Instance = this;
 }