Ejemplo n.º 1
0
        private void Awake()
        {
            stores = new Dictionary <StoreView, IStreetItemController>();

            modelController     = modelContext.ModelController;
            blocksController    = viewContext.BlocksController;
            viewStateController = viewContext.ViewStateController;
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            startThoughtsProvider        = viewContext.StartThoughtsProvider;
            collectionThoughtsProvider   = viewContext.CollectionThoughtsProvider;
            notificationThoughtsProvider = viewContext.NotificationThoughtsProvider;

            viewStateController = viewContext.ViewStateController;

            modelController      = modelContext.ModelController;
            collectionController = modelContext.CollectionController;
        }
Ejemplo n.º 3
0
        void Awake()
        {
            controller = (ViewStateController)target;

            visibleOnIcon  = EditorGUIUtility.IconContent("animationvisibilitytoggleon");
            visibleOffIcon = EditorGUIUtility.IconContent("animationvisibilitytoggleoff");

            list = new ReorderableList(controller.states, typeof(GameObject), true, true, true, true);

            ReorderableListUtil.SetColumns(list, new List <ReorderableListColumn <GameObject> >
            {
                new ReorderableListColumn <GameObject> {
                    Name         = "Id",
                    Width        = 20,
                    ItemRenderer = (GameObject state, Rect rect, int index, bool isActive, bool isFocused) => {
                        EditorGUI.LabelField(rect, "" + index);
                    }
                },
                new ReorderableListColumn <GameObject> {
                    Name         = "State",
                    WidthRatio   = 1,
                    ItemRenderer = (GameObject state, Rect rect, int index, bool isActive, bool isFocused) => {
                        controller.states[index] = (GameObject)EditorGUI.ObjectField(rect, state, typeof(GameObject), true);
                    }
                },
                new ReorderableListColumn <GameObject> {
                    Name         = "",
                    Width        = 10,
                    ItemRenderer = (GameObject state, Rect rect, int index, bool isActive, bool isFocused) => {
                        EditorGUI.LabelField(rect, "");
                    }
                },
                new ReorderableListColumn <GameObject> {
                    Name         = "",
                    Width        = 15,
                    ItemRenderer = (GameObject state, Rect rect, int index, bool isActive, bool isFocused) => {
                        var content = state.activeSelf ? visibleOnIcon : visibleOffIcon;
                        var r       = new Rect(rect);
                        r.y        += 4;
                        var b       = GUI.Toggle(r, state.activeSelf, content, GUIStyle.none);
                        if (b != state.activeSelf && b)
                        {
                            controller.SetState(state);
                        }
                    }
                }
            });
        }
 void Awake()
 {
     States = GetComponent<ViewStateController>();
     ErrorPopup = GetComponentsInChildren<ErrorPopup>(true)[0];
 }
Ejemplo n.º 5
0
 public BackButtonListener(ViewStateController viewStateController)
 {
     this.viewStateController = viewStateController;
 }
Ejemplo n.º 6
0
 protected virtual void Awake()
 {
     viewStateController = viewContext.ViewStateController;
 }