예제 #1
0
        public static void AnimatedDimiss_Scene(HUDStandardItem hudItem, FScene scene, bool bDestroy, float fDuration = 0.25f)
        {
            AnimatedDismissHUDItem anim = hudItem.RootGameObject.AddComponent <AnimatedDismissHUDItem>();

            anim.CompleteCallback += () => {
                anim.HUDItem.ClearGameObjects(false);
                scene.RemoveUIElement(anim.HUDItem, bDestroy);
            };
            anim.Play(hudItem, fDuration);
        }
예제 #2
0
        public static void AnimatedDimiss_Cockpit(HUDStandardItem hudItem, Cockpit cockpit, float fDuration = 0.25f)
        {
            AnimatedDismissHUDItem anim = hudItem.RootGameObject.AddComponent <AnimatedDismissHUDItem>();

            anim.CompleteCallback += () => {
                anim.HUDItem.ClearGameObjects(false);
                cockpit.RemoveUIElement(anim.HUDItem, true);
            };
            anim.Play(hudItem, fDuration);
        }
예제 #3
0
        public static void AnimatedDimiss_Cockpit(HUDStandardItem hudItem, Cockpit cockpit, bool bDestroy, float fDuration = 0.25f)
        {
            AnimatedDismissHUDItem anim = hudItem.RootGameObject.AddComponent <AnimatedDismissHUDItem>();

            anim.CompleteCallback += () => {
                if (bDestroy)
                {
                    anim.HUDItem.ClearGameObjects(false);       // what is this line for??
                }
                cockpit.RemoveUIElement(anim.HUDItem, bDestroy);
                if (bDestroy == false)
                {
                    anim.HUDItem.IsVisible = false;
                }
            };
            anim.Play(hudItem, fDuration);
        }