Пример #1
0
        public static ProjectileDeflectionFeedbackIconContainer Get()
        {
            if (Instance == null)
            {
                Instance = FindObjectOfType <ProjectileDeflectionFeedbackIconContainer>();
                if (Instance == null)
                {
                    var obj = new GameObject("ProjectileDeflectionFeedbackIconContainer", new Type[] { typeof(RectTransform) });
                    obj.transform.parent = CoreGameSingletonInstances.GameCanvas.transform;
                    (obj.transform as RectTransform).ResetLocalPositionAndRotation();
                    Instance = obj.AddComponent <ProjectileDeflectionFeedbackIconContainer>();
                }
            }

            return(Instance);
        }
Пример #2
0
 public static ProjectileDeflectionFeedbackIcon Build(GameObject ProjectileDeflectionFeedbackPrefab, InputID DisplayedInput)
 {
     return(new ProjectileDeflectionFeedbackIcon(MonoBehaviour.Instantiate(ProjectileDeflectionFeedbackPrefab, ProjectileDeflectionFeedbackIconContainer.Get().transform), DisplayedInput));
 }