コード例 #1
0
        public static GlobalHealthGlobeConfigurationGameObject Get()
        {
            if (Instance == null)
            {
                Instance = GameObject.FindObjectOfType <GlobalHealthGlobeConfigurationGameObject>();
            }

            return(Instance);
        }
コード例 #2
0
        public static CoreInteractiveObject SpawnHealthGlobeWithDefaultModel(CoreInteractiveObject SourceInteractiveObject,
                                                                             HealthGlobeSpawnInitializationData HealthGlobeSpawnInitializationData)
        {
            var GlobalHealthGlobeConfiguration = GlobalHealthGlobeConfigurationGameObject.Get().GlobalHealthGlobeConfiguration;
            var HealthGlobeInteractiveObjectInitializerTemplate = GameObject.Instantiate(GlobalHealthGlobeConfiguration.HealthGlobeTemplatePrefab);

            var BeziersControlPointsBuildInput = new BeziersControlPointsBuildInput(
                SourceInteractiveObject.InteractiveGameObject.GetAverageModelWorldBounds().center, HealthGlobeSpawnInitializationData.WorldPosition, Vector3.up, BeziersControlPointsShape.CURVED, Random.Range(2.5f, 3f));

            HealthGlobeInteractiveObjectInitializerTemplate.SetupBeforeObjectCreation(HealthGlobeSpawnInitializationData.HealthRecovered, BeziersControlPointsBuildInput);
            return(HealthGlobeInteractiveObjectInitializerTemplate.Init());
        }