From eabc4923c9b69f3473c73ab6a5241281a445604d Mon Sep 17 00:00:00 2001 From: bmclean Date: Mon, 11 May 2020 17:51:22 -0500 Subject: [PATCH] Removing Fade.cs that only worked on PC Due to this bug https://github.com/GodotVR/godot_oculus_mobile/issues/72 --- WOLF3D.csproj | 1 - WOLF3DGame/Fade.cs | 49 ---------------------------------------------- WOLF3DGame/Main.cs | 17 ---------------- 3 files changed, 67 deletions(-) delete mode 100644 WOLF3DGame/Fade.cs diff --git a/WOLF3D.csproj b/WOLF3D.csproj index 9840816..55586fc 100644 --- a/WOLF3D.csproj +++ b/WOLF3D.csproj @@ -68,7 +68,6 @@ - diff --git a/WOLF3DGame/Fade.cs b/WOLF3DGame/Fade.cs deleted file mode 100644 index 684ec32..0000000 --- a/WOLF3DGame/Fade.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Godot; - -namespace WOLF3D.WOLF3DGame -{ - public class Fade : CenterContainer - { - public override void _Ready() - { - Name = "Fade"; - SizeFlagsHorizontal = (int)SizeFlags.ExpandFill; - SizeFlagsVertical = (int)SizeFlags.ExpandFill; - GrowHorizontal = GrowDirection.Both; - GrowVertical = GrowDirection.Both; - RectSize = new Vector2(float.MaxValue, float.MaxValue); - RectMinSize = new Vector2(float.MaxValue, float.MaxValue); - ColorRect = new ColorRect() - { - Name = "Fade", - Color = Color.Color8(0, 0, 255, 64), - SizeFlagsHorizontal = (int)SizeFlags.ExpandFill, - SizeFlagsVertical = (int)SizeFlags.ExpandFill, - GrowHorizontal = GrowDirection.Both, - GrowVertical = GrowDirection.Both, - RectSize = new Vector2(float.MaxValue, float.MaxValue), - RectMinSize = new Vector2(float.MaxValue, float.MaxValue), - }; - } - - public ColorRect ColorRect - { - get => colorRect; - set - { - if (colorRect != null) - RemoveChild(colorRect); - colorRect = value; - if (colorRect != null) - AddChild(colorRect); - } - } - private ColorRect colorRect = null; - - public Color Color - { - get => ColorRect.Color; - set => ColorRect.Color = value; - } - } -} diff --git a/WOLF3DGame/Main.cs b/WOLF3DGame/Main.cs index 6248d00..c4350e4 100644 --- a/WOLF3DGame/Main.cs +++ b/WOLF3DGame/Main.cs @@ -41,19 +41,6 @@ public static Color Color set => WorldEnvironment.Environment.BackgroundColor = value; } - public static Fade Fade - { - get => fade; - set - { - fade?.GetParent()?.RemoveChild(fade); - fade = value; - if (fade != null) - I.GetViewport().CallDeferred("add_child", fade); - } - } - private static Fade fade = null; - public static ActionRoom ActionRoom { get; set; } public static MenuRoom MenuRoom { get; set; } public static Room Room @@ -64,12 +51,9 @@ public static Room Room if (I.room != null) { I.room.Exit(); - Fade?.GetParent()?.RemoveChild(Fade); I.RemoveChild(I.room); } I.AddChild(I.room = value); - if (Fade != null) - I.GetViewport().CallDeferred("add_child", Fade); I.room.Enter(); } } @@ -92,7 +76,6 @@ public override void _Ready() else GD.Print("ARVRInterface failed to initialize!"); - Fade = new Fade(); AddChild(SoundBlaster.OplPlayer); Room = new SetupRoom(); }