Example #1
0
 public void Construct(List <CartographicIsland> structures, callbackMethod m)
 {
     cb     = m;
     status = Status.Working;
     Debug.Log("Started with Island-GameObject construction!");
     StartCoroutine(constructAll(structures));
 }
Example #2
0
 public void Unsubscribe(Type id, callbackMethod callback)
 {
     if (subscribers.TryGetValue(id, out var pairs))
     {
         pairs.Remove(callback);
     }
 }
 //Public method to construct the physical distribution of islands in a certain volume
 public void ConstructRndLayout(BidirectionalGraph <GraphVertex, GraphEdge> g, callbackMethod m, Vector3 min, Vector3 max, float minDis, int maxIt)
 {
     cb      = m;
     graph   = g;
     _thread = new Thread(() => computeRNDGraphLayoutThreaded(min, max, minDis, maxIt));
     _thread.Start();
 }
Example #4
0
 //Public method to construct an OsgiProject from a JSONObject in a separate thread
 public void Construct(JSONObject jObj, callbackMethod m)
 {
     cb      = m;
     jsonObj = jObj;
     _thread = new Thread(ConstructProject);
     _thread.Start();
 }
 public void Construct(List <IslandGO> islands, callbackMethod m)
 {
     cb     = m;
     status = Status.Working;
     Debug.Log("Started with Dock-GameObject construction!");
     StartCoroutine(constructAll(islands));
 }
 //Public method to load a JSONObject from a file in a separate thread
 public void Construct(string filePath, callbackMethod m)
 {
     fileToLoad = filePath;
     cb         = m;
     _thread    = new Thread(Load);
     _thread.Start();
 }
 //Public method to construct IslandStructures from an OsgiProject in a separate thread
 public void Construct(OsgiProject proj, callbackMethod m)
 {
     cb          = m;
     osgiProject = proj;
     _thread     = new Thread(ConstructIslands);
     _thread.Start();
 }
 public void ConstructFDLayout(OsgiProject proj, callbackMethod m, float stepSize, int simulationSteps)
 {
     cb      = m;
     project = proj;
     graph   = proj.getDependencyGraph();
     _thread = new Thread(() => computeForceDirectedLayoutThreaded(simulationSteps, stepSize));
     _thread.Start();
 }
 public void Construct(List <Service> services, List <IslandGO> islandGOs, callbackMethod m)
 {
     cb            = m;
     status        = Status.Working;
     serviceVolume = new ServiceVolume();
     Debug.Log("Started with Service-GameObject construction!");
     StartCoroutine(constructAll(services, islandGOs));
 }
Example #10
0
        public void Subscribe(Type id, callbackMethod callback)
        {
            List <callbackMethod> pairs;

            if (!subscribers.TryGetValue(id, out pairs))
            {
                pairs = new List <callbackMethod> {
                };
                subscribers.Add(id, pairs);
            }
            pairs.Add(callback);
        }
Example #11
0
    static public void Enable(Sprite icon, callbackMethod callback)
    {
        //Movendo ele antes pra nao aparecer ele piscando no primeiro frame
        singleton.Move(Camera.main.ScreenToWorldPoint(Input.mousePosition));

        singleton.callback = callback;

        Cursor.visible         = false;
        singleton.following    = true;
        singleton.view.enabled = true;
        singleton.view.sprite  = icon;
    }