Exemplo n.º 1
0
 public void SetRoute()
 {
     WindowsOpener.OpenRouteCreatorWindow(delegate(Route route)
     {
         group.route = route;
         UpdateWindow();
     }, group.route);
 }
Exemplo n.º 2
0
    public void UpdateList()
    {
        foreach (Transform curChild in routesList)
        {
            if (curChild.gameObject.activeSelf)
            {
                Destroy(curChild.gameObject);
            }
        }
        int i = 0;

        foreach (Route curRoute in routes)
        {
            Transform _go = Instantiate(routePrefab).transform;
            _go.SetParent(routesList);
            _go.Find("Name").GetComponent <Text>().text = curRoute.name;
            int _i = i;
            _go.Find("Edit").GetComponent <Button>().onClick.AddListener(delegate { WindowsOpener.OpenRouteCreatorWindow(delegate(Route route) { routes[_i] = route; UpdateList(); }, curRoute); });
            _go.Find("Delete").GetComponent <Button>().onClick.AddListener(delegate { Debug.Log(_i);  routes.RemoveAt(_i); UpdateList(); });
            _go.gameObject.SetActive(true);
            i++;
        }
    }
 public void SetRoute()
 {
     WindowsOpener.OpenRouteCreatorWindow(delegate(Route route) { vehicle.MyRoute = route; }, vehicle.MyRoute);
 }
Exemplo n.º 4
0
 public void ButCreateRoute()
 {
     WindowsOpener.OpenRouteCreatorWindow(delegate(Route route) { routes.Add(route); PrintList(); UpdateList(); });
 }