示例#1
0
 private static void PostScreenPromptVisibility(bool isVisible)
 {
     if (isVisible)
     {
         MaterialHelper.MakeGraphicChildrenDrawOnTop(Locator.GetPromptManager().gameObject);
     }
 }
示例#2
0
                private static void PostDialogueOptionAwake(DialogueOptionUI __instance)
                {
                    var text     = __instance.GetComponentInChildren <Text>();
                    var collider = __instance.gameObject.AddComponent <BoxCollider>();

                    var rectTransform = text.GetComponent <RectTransform>();
                    var thickness     = 10f;
                    var height        = 40;
                    var width         = rectTransform.rect.width;

                    collider.size   = new Vector3(width, height, thickness);
                    collider.center = new Vector3(0, -height * 0.5f, thickness * 0.5f);

                    MaterialHelper.MakeGraphicChildrenDrawOnTop(__instance.gameObject);
                }
示例#3
0
            private void SetUpCanvas()
            {
                _canvas            = new GameObject().AddComponent <Canvas>();
                _canvas.renderMode = RenderMode.WorldSpace;
                var followTarget = _canvas.gameObject.AddComponent <FollowTarget>();

                _canvas.transform.localScale    = Vector3.one * 0.0015f;
                followTarget.target             = Locator.GetPlayerCamera().transform;
                followTarget.localPosition      = Vector3.forward * 4;
                followTarget.rotationSmoothTime = 0.5f;
                followTarget.positionSmoothTime = 0.5f;
                _canvas.gameObject.AddComponent <ConditionalRenderer>().getShouldRender = ShouldRender;

                SetUpBackground();
                SetUpText();

                MaterialHelper.MakeGraphicChildrenDrawOnTop(_canvas.gameObject);
                LayerHelper.ChangeLayerRecursive(_canvas.gameObject, LayerMask.NameToLayer("UI"));
            }
示例#4
0
 private static void PostStartConversation()
 {
     MaterialHelper.MakeGraphicChildrenDrawOnTop(_canvasTransform.gameObject);
 }