Example #1
0
 public void Construct(Logger logger, Settings settings, HierarchyManager hierarchyManager, ScreenModeController screenModeController)
 {
     _logger               = logger;
     _settings             = settings;
     _hierarchyManager     = hierarchyManager;
     _screenModeController = screenModeController;
 }
    public void Update()
    {
        //Send current colour to HierarchyManager script
        HierarchyManager hierarchyManager = GameObject.Find("InspectionManager").GetComponent <HierarchyManager>();

        hierarchyManager.GetMarkingColour(markingColour);
    }
Example #3
0
        public override GameObject Deserialize()
        {
            GameObject gameObject = new GameObject(Name);

            if (_isRectTransform)
            {
                ConvertToRectTransform(gameObject);
            }

            Deserialize(gameObject);

            gameObject.SetActive(_activeSelf);
            gameObject.layer    = _layer;
            gameObject.isStatic = _isStatic;
            gameObject.tag      = _tag;

            ComponentCacheDeserializer componentCacheDeserializer = new ComponentCacheDeserializer(this, gameObject);

            foreach (Reference child in Children)
            {
                Deserializer.GetDeserializedObject <GameObject>(child.ID, instance =>
                {
                    instance.transform.SetParent(gameObject.transform);

                    HierarchyManager.ExecuteTransform(instance.transform);
                });
            }

            return(gameObject);
        }
    //This script has to run the timer to get the right duration for the no path found error.
    //Also, variables are sent to other scripts.
    public void Update()
    {
        //Send model selection to other scripts
        modelName = modelLoad;
        HierarchyManager  hierarchyManager  = GameObject.Find("InspectionManager").GetComponent <HierarchyManager>();
        InspectionButtons inspectionButtons = GameObject.Find("InspectionManager").GetComponent <InspectionButtons>();
        CoordinatesInput  coordinatesInput  = GameObject.Find("ImageTarget/" + modelName + "(Clone)/default").GetComponent <CoordinatesInput>();

        hierarchyManager.GetModelName(modelName);
        inspectionButtons.GetModelName(modelName);
        coordinatesInput.GetModelName(modelName);

        //Send model selection to scripts of number objects (responsible for creating the marking tag)
        numbersObjects = GameObject.FindGameObjectsWithTag("Number");
        for (int i = 0; i < numbersObjects.Length - 1; i++)
        {
            NumberValue numberValue = numbersObjects[i].GetComponent <NumberValue>();
            numberValue.GetModelName(modelName);
        }

        pathList = path;

        //Timer to let popup wait between active and inactive
        if (timer >= 0)
        {
            timer = timer - Time.deltaTime;
        }
        if (timer < 0)
        {
            timer = 3;
            noPathPopUp.SetActive(false);
        }
    }
Example #5
0
 protected override void Start()
 {
     base.Start();
     hierarchyManager = HierarchyManager.instance;
     scriptManager    = ScriptManager.instance;
     pixel            = GetComponent <Pixel>();
 }
Example #6
0
 void Start()
 {
     hierarchyManager = HierarchyManager.instance;
     MouseEventDetector.instance.onSingleMouseUp += (position) =>
     {
         CreatePixel(position);
     };
 }
    private Pool InstantiatePoolObject(float radius)
    {
        Pool instance = HierarchyManager.Instantiate(prefab, HierarchyCategory.Effects);

        instance.Radius = radius;

        return(instance);
    }
Example #8
0
    public IAbilityObject Spawn(Ability ability, float multiplier)
    {
        IAbilityObject abilityObject = Value.Spawn(ability, multiplier);

        HierarchyManager.Add(abilityObject.GameObject, HierarchyCategory.AbilityObjects);

        return(abilityObject);
    }
Example #9
0
        public void GetHierarchyName()
        {
            var hierarchyRoot = new HierarchyRoot();
            var hierarchyName = "GetThisName";

            HierarchyManager.AddHierarchy(hierarchyName, hierarchyRoot);
            Assert.AreEqual(HierarchyManager.GetHierarchyName(hierarchyRoot), hierarchyName);
        }
Example #10
0
        public HierarchyViewModel(HierarchyManager manager)
        {
            _dispatcher = Dispatcher.CurrentDispatcher;

            Manager = manager;
            Manager.HierarchyChanged += HandleHierarchyChanged;

            InitializeNodes();
        }
Example #11
0
        public void SetHierarchyName()
        {
            var             newName         = "newName";
            HierarchyObject hierarchyObject = HierarchyManager.LoadedHierarchies["test"];

            HierarchyManager.SetHierarchyName("test", newName);
            Assert.IsTrue(HierarchyManager.LoadedHierarchies.ContainsKey(newName));
            Assert.AreEqual(HierarchyManager.GetHierarchyName(hierarchyObject), newName);
        }
Example #12
0
 public MusicPlayer(HierarchyManager hierarchyManager)
 {
     _screenSystem    = hierarchyManager.GetField <ScreenSystem, HierarchyManager>("_screenSystem");
     _floatingScreen  = FloatingScreen.CreateFloatingScreen(new Vector2(120f, 35f), false, Vector3.zero, Quaternion.identity);
     _musicPlayerView = BeatSaberUI.CreateViewController <MusicPlayerView>();
     _floatingScreen.SetRootViewController(_musicPlayerView, true);
     _floatingScreen.transform.SetParent(_screenSystem.transform, false);
     _floatingScreen.transform.localPosition = new Vector3(-2.08f, 2.8f, 1.45f);
     _floatingScreen.transform.localRotation = Quaternion.Euler(new Vector3(335f, 300f, 0f));
 }
    public IAbilityObject Spawn(Ability ability, float multiplier)
    {
        ExplosionObject obj = HierarchyManager.Instantiate(this, HierarchyCategory.Effects);

        obj.ability    = ability;
        obj.Multiplier = multiplier;
        obj.StartTime  = Time.time;

        return(obj);
    }
Example #14
0
    void Start()
    {
        hierarchyManager = GameManager.instance.GetComponent <HierarchyManager>();

        fHealth = baseHealth;
        fSpeed  = baseSpeed;

        SetHealth();
        SetSpeed();
    }
Example #15
0
 protected void Construct(InfoView infoView, IAlertQueue alertQueue, AlertListView alertListView, AlertEditView alertEditView, AlertDetailView alertDetailView, HierarchyManager hierarchyManager, ModalStateManager modalStateManager, NavigationController navigationController)
 {
     _infoView             = infoView;
     _alertQueue           = alertQueue;
     _alertListView        = alertListView;
     _alertEditView        = alertEditView;
     _alertDetailView      = alertDetailView;
     _hierarchyManager     = hierarchyManager;
     _modalStateManager    = modalStateManager;
     _navigationController = navigationController;
 }
Example #16
0
        public void TestFollowPath()
        {
            HierarchyObject hierarchyObjectToFind  = new ScriptObject();
            HierarchyObject hierarchyObjectToFind2 = new UIObject();

            HierarchyManager.LoadedHierarchies["test"].AddChild("followPathTest", hierarchyObjectToFind);
            HierarchyManager.LoadedHierarchies["test"].LocalHierarchy["followPathTest"]
            .AddChild("followPathTest2", hierarchyObjectToFind2);
            Assert.AreEqual(hierarchyObjectToFind, HierarchyManager.FollowPath("test/followPathTest"));
            Assert.AreEqual(hierarchyObjectToFind2, HierarchyManager.FollowPath("test/followPathTest/followPathTest2"));
        }
 public override void OnDeserialize(RectTransform rectTransform)
 {
     HierarchyManager.Subscribe(rectTransform, transform =>
     {
         transform.pivot              = _pivot;
         transform.anchorMin          = _anchorMin;
         transform.anchorMax          = _anchorMax;
         transform.anchoredPosition3D = _anchoredPosition3D;
         transform.offsetMin          = _offsetMin;
         transform.offsetMax          = _offsetMax;
         transform.sizeDelta          = _sizeDelta;
     });
 }
Example #18
0
    public ChargedBehaviourEffects(IEnumerable <AbilityRenderer> chargeEffectPrefabs, Entity owner)
    {
        Owner = owner;

        instances = new List <AbilityRenderer>();
        foreach (AbilityRenderer chargePrefab in chargeEffectPrefabs)
        {
            AbilityRenderer newRenderer = HierarchyManager.Instantiate(chargePrefab, HierarchyCategory.Effects);
            owner.AddOwnedObject(newRenderer.gameObject);

            instances.Add(newRenderer);
        }
    }
Example #19
0
        public void Initialize()
        {
            var hierarchyRoot = new HierarchyRoot();
            var ho1           = new ScriptObject();
            var ho2           = new WorldObject();
            var ho33          = new UIObject();
            var ho3           = new UIObject();

            ho3.AddChild("ho3.3", ho33);
            hierarchyRoot.AddChild("ho1", ho1);
            hierarchyRoot.AddChild("ho2", ho2);
            hierarchyRoot.AddChild("ho3", ho3);
            HierarchyManager.AddHierarchy("test", hierarchyRoot);
        }
        public static void RunWithImaginaryHierarchyObject(Assembly[] userAssemblies,
                                                           ImaginaryHierarchyObject rootHierarchyObject, bool raiseStartEvent = true)
        {
            if (IsRunning)
            {
                throw new Exception("Already running!");
            }

            #region Creating

            HierarchyManager.AddHierarchy(rootHierarchyObject.Name, (HierarchyObject)rootHierarchyObject.CreateInstance());

            #endregion

            Run(userAssemblies, raiseStartEvent);
        }
Example #21
0
    //Get the marking tag each frame
    public void Update()
    {
        //Get the number from the display within the Add Window
        markingTag = numberDisplay.GetComponent <TextMeshPro>().text;

        //Send variables to other scripts
        HierarchyManager hierarchyManager = GameObject.Find("InspectionManager").GetComponent <HierarchyManager>();

        hierarchyManager.GetMarkingTag(markingTag);
        NewLoadSave newLoadSave = GameObject.Find("InspectionManager").GetComponent <NewLoadSave>();

        newLoadSave.GetMarkingTag(markingTag);
        CoordinatesInput coordinatesInput = GameObject.Find("ImageTarget/" + modelName + "(Clone)/default").GetComponent <CoordinatesInput>();

        coordinatesInput.GetMarkingTag(markingTag);
    }
    public static void RefreshProject(Project project)
    {
        try
        {
            project.Save();
        }
        catch (Exception)
        {
        }

        IVsHierarchy projectHierarchy = HierarchyManager.GetEquivalent(project);

        if (projectHierarchy != null)
        {
            Guid projectGuid = HierarchyManager.GetProjectGuid(projectHierarchy);
            HierarchyManager.EnsureProjectIsLoaded(projectGuid);
            HierarchyManager.UnloadProject(projectGuid);
            HierarchyManager.ReloadHierarchy(projectGuid);
            HierarchyManager.EnsureProjectIsLoaded(projectGuid);
        }
    }
Example #23
0
    private void Awake()
    {
        Application.targetFrameRate = TargetFrameRate;
        DefaultShader           = Shader.Find("UI/Default");
        MainCamera              = Camera.main;
        DisplayObjectItemPrefab = Resources.Load <GameObject>("Prefabs/DisplayObjectItem");
        DisplayObjectPrefab     = Resources.Load <GameObject>("Prefabs/DisplayObject");
        ModuleItemPrefab        = Resources.Load <GameObject>("Prefabs/ModuleItem");
        DialogPrefab            = Resources.Load <GameObject>("Prefabs/Dialog");
        TipPrefab              = Resources.Load <GameObject>("Prefabs/Tip");
        SelectPrefab           = Resources.Load <GameObject>("Prefabs/Select-Rect");
        AlignLinePrefab        = Resources.Load <GameObject>("Prefabs/AlignLine");
        QuickTipPrefab         = Resources.Load <GameObject>("Prefabs/Quick-Tip");
        RootCanvas             = GameObject.FindGameObjectWithTag("RootCanvas");
        DisplayObjectContainer = GameObject.FindGameObjectWithTag("DisplayObjectContainer");
        HierarchyContainer     = GameObject.FindGameObjectWithTag("HierarchyContainer");
        QuickTipContainer      = GameObject.FindGameObjectWithTag("QuickTipContainer");
//		ContainerManager = DisplayObjectContainer.GetComponent<ContainerManager>();
        HierarchyManager = HierarchyContainer.GetComponent <HierarchyManager>();
        ContainerRect    = DisplayObjectContainer.GetComponent <RectTransform>();
        RootCanvasRect   = RootCanvas.GetComponent <RectTransform>();
        ScaleSlider      = GameObject.FindGameObjectWithTag("ScaleSlider").GetComponent <Slider>();
        FrameToggle      = GameObject.FindGameObjectWithTag("FrameToggle").GetComponent <Toggle>();
    }
Example #24
0
 internal BaseGameUiHandler(HierarchyManager hierarchyManager)
 {
     Instance          = this;
     _hierarchyManager = hierarchyManager;
     _screenSystem     = hierarchyManager.gameObject.GetComponent <ScreenSystem>();
 }
 private BaseGameUiHandler(HierarchyManager hierarchyManager)
 {
     _hierarchyManager = hierarchyManager;
     _screenSystem     = hierarchyManager.gameObject.GetComponent <ScreenSystem>();
 }
 void Start()
 {
     hierarchyManager = GameManager.instance.GetComponent <HierarchyManager>();
     EnemyBase        = GetComponent <EnemyBase>();
     target           = Waypoints.points[0];
 }
Example #27
0
 void Start()
 {
     hierarchyManager = GameManager.instance.GetComponent <HierarchyManager>();
     InvokeRepeating("UpdateTarget", 0f, 0.5f);
 }
Example #28
0
 protected virtual void Awake()
 {
     HierarchyManager.Add(gameObject, hierarchyCategory);
 }
 void Start()
 {
     hierarchyManager = HierarchyManager.instance;
 }
Example #30
0
 void Start()
 {
     Reset();
     hierarchyManager = GameManager.instance.GetComponent <HierarchyManager>();
 }