private void Awake() { initStandardButtons(); dictionaryOfDecorationDefinitions = Service.Get <IGameData>().Get <Dictionary <int, DecorationDefinition> >(); decorationInventoryService = Service.Get <DecorationInventoryService>(); CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>(); DataEntityHandle handle = cPDataEntityCollection.FindEntityByName("ActiveSceneData"); sceneLayoutListener = cPDataEntityCollection.Whenever <SceneLayoutData>(handle, onLayoutAdded, onLayoutRemoved); }
public void Awake() { canvas = GetComponent <Canvas>(); canvasScalerExt = GetComponent <CanvasScalerExt>(); manipulatableObject = GetComponentInParent <ManipulatableObject>(); decorationInventoryService = Service.Get <DecorationInventoryService>(); confirmButtonImage = ConfirmButton.GetComponent <Image>(); duplicateButtonImage = DuplicateButton.GetComponent <Image>(); baseCamera = SceneRefs.Get <BaseCamera>(); BaseCamera obj = baseCamera; obj.Moved = (System.Action)Delegate.Combine(obj.Moved, new System.Action(OnCameraMoved)); Service.Get <EventDispatcher>().AddListener <InputEvents.ZoomEvent>(onInputZoom); IsInitialized = false; isDecorationSet = false; hide(); }
private void Awake() { dataEntityCollection = Service.Get <CPDataEntityCollection>(); eventDispatcher = Service.Get <EventDispatcher>(); decorationInventoryService = Service.Get <DecorationInventoryService>(); sceneHandle = dataEntityCollection.FindEntityByName("ActiveSceneData"); awakeEvents = new EventChannel(eventDispatcher); awakeEvents.AddListener <SceneTransitionEvents.LayoutGameObjectsLoaded>(onLayoutGameObjectsLoaded); sceneModifiers = new ISceneModifier[1] { new EditModeModifier(this) }; IGameData gameData = Service.Get <IGameData>(); decorationDefinitions = gameData.Get <Dictionary <int, DecorationDefinition> >(); structureDefinitions = gameData.Get <Dictionary <int, StructureDefinition> >(); SceneRefs.Set(this); }
protected override void Start() { base.Start(); if (SceneRefs.IsSet <SceneManipulationService>()) { sceneManipulationService = SceneRefs.Get <SceneManipulationService>(); sceneManipulationService.ObjectRemoved += onObjectAddedOrRemoved; sceneManipulationService.ObjectAdded += onObjectAddedOrRemoved; sceneManipulationService.NewObjectCreated += onObjectAddedOrRemoved; } if (SceneRefs.IsSet <ObjectManipulationInputController>()) { objectManipulationInputController = SceneRefs.Get <ObjectManipulationInputController>(); objectManipulationInputController.InteractionStateChanged += onInteractionStateChanged; } recentDecorationsService = Service.Get <RecentDecorationsService>(); decorationInventoryService = Service.Get <DecorationInventoryService>(); decorationCategoryManager = GetComponentInChildren <DecorationCategoryManager>(); if (decorationCategoryManager != null) { DecorationCategoryManager obj = decorationCategoryManager; obj.CategoryRefreshedEvent = (CategoryRefreshedEvent)Delegate.Combine(obj.CategoryRefreshedEvent, new CategoryRefreshedEvent(onCategoryUpdated)); } totalDragHeight = (base.transform as RectTransform).rect.height; GameObject gameObject = GameObject.Find("IglooMenuLoader"); if (gameObject != null) { totalDragHeight += (gameObject.transform as RectTransform).rect.height; } Canvas componentInParent = GetComponentInParent <Canvas>(); if (componentInParent != null) { Assert.AreEqual(componentInParent.transform.localScale.x, componentInParent.transform.localScale.y); totalDragHeight *= componentInParent.transform.localScale.x; } returnToPreviousState = GetComponentInParent <ReturnToFSMStateOnInteractionState>(); }
public InMyIglooDecorationCategoryFilter(Dictionary <int, DecorationDefinition> dictionaryOfDecorationDefinitions, DecorationInventoryService decorationInventoryService, SceneLayoutData sceneLayoutData) : base(dictionaryOfDecorationDefinitions, decorationInventoryService) { this.sceneLayoutData = sceneLayoutData; if (this.sceneLayoutData == null) { Log.LogErrorFormatted(this, "The layout data is null"); } }
public RecentDecorationCategoryFilter(Dictionary <int, DecorationDefinition> dictionaryOfDecorationDefinitions, DecorationInventoryService decorationInventoryService) : base(dictionaryOfDecorationDefinitions, decorationInventoryService) { }
protected override void Awake() { base.Awake(); inventoryService = Service.Get <DecorationInventoryService>(); }
public SpecificDecorationCategoryFilter(Dictionary <int, DecorationDefinition> dictionaryOfDecorationDefinitions, DecorationInventoryService decorationInventoryService, DecorationCategoryDefinition categoryDefinition) : base(dictionaryOfDecorationDefinitions, decorationInventoryService) { this.categoryDefinition = categoryDefinition; }
public AbstractDecorationCategoryFilter(Dictionary <int, DecorationDefinition> dictionaryOfDecorationDefinitions, DecorationInventoryService decorationInventoryService) { this.dictionaryOfDecorationDefinitions = dictionaryOfDecorationDefinitions; this.decorationInventoryService = decorationInventoryService; }