Skip to content

Commit

Permalink
add partial keyword for subclasses of Godot.Object
Browse files Browse the repository at this point in the history
since 4.0, `partial` has been requied for the the subclasses of `Godot.Object`.

For more information, refer to godotengine/godot#46713
  • Loading branch information
dasg34 committed Aug 10, 2022
1 parent b94caa0 commit fab6788
Show file tree
Hide file tree
Showing 36 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Behaviors/BehaviorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Assets.Scripts.Behaviors
{
public abstract class BehaviorBase : Node, IBehavior
public abstract partial class BehaviorBase : Node, IBehavior
{
public IActor Actor { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Behaviors/ButtonBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Assets.Scripts.Behaviors
{
public class ButtonBehavior : TargetBehavior, IButtonBehavior
public partial class ButtonBehavior : TargetBehavior, IButtonBehavior
{
public new ButtonBehaviorContext Context => _context as ButtonBehaviorContext;

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Behaviors/PenBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Assets.Scripts.Behaviors
{
public class PenBehavior : TargetBehavior, IPenBehavior
public partial class PenBehavior : TargetBehavior, IPenBehavior
{
public new PenBehaviorContext Context => _context as PenBehaviorContext;

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Behaviors/TargetBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Assets.Scripts.Behaviors
{
public class TargetBehavior : BehaviorBase, ITargetBehavior
public partial class TargetBehavior : BehaviorBase, ITargetBehavior
{
protected TargetBehaviorContext _context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Assets.Scripts.Control
{
public abstract class BaseController : Spatial, IController
public abstract partial class BaseController : Spatial, IController
{
public InputSource InputSource { get; protected set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Assets.Scripts.Control
{
public class HandController : BaseController
public partial class HandController : BaseController
{
private bool isPinching;
private bool pinchChanged;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Assets.Scripts.Control
{
internal class MouseController : BaseController
internal partial class MouseController : BaseController
{
private Camera mainCamera;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Assets.Scripts.Control
{
internal class KeyboardPositionControl : Spatial, IPositionControl
internal partial class KeyboardPositionControl : Spatial, IPositionControl
{
public float Speed { get; set; } = 1f;
private Camera mainCamera;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Assets.Scripts.Control
{
public class VirtualGamepadPositionControl : Spatial, IPositionControl
public partial class VirtualGamepadPositionControl : Spatial, IPositionControl
{
private Joystick2D gamepad;
private Camera mainCamera;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Assets.Scripts.Control
{
internal class MouseRotationControl : Spatial, IRotationControl
internal partial class MouseRotationControl : Spatial, IRotationControl
{
private bool cameraMove = false;
private Vector2 mouseDelta = new Vector2();
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Joystick2D.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Godot;

public class Joystick2D : TouchScreenButton
public partial class Joystick2D : TouchScreenButton
{
private Vector2 playerDirection;
private Vector2 joystickCenter;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/LaunchMRE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum LaunchType
}

[Tool]
public class LaunchMRE : Spatial
public partial class LaunchMRE : Spatial
{
private LaunchType launchType = LaunchType.OnStart;

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/MREComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void LogWarning(string message)
}
}

public class MREComponent : Spatial
public partial class MREComponent : Spatial
{
public delegate void AppEventHandler(MREComponent app);

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum ControllerType
Mouse = 1 << 1,
}

public class Player : ARVROrigin
public partial class Player : ARVROrigin
{
[Export]
private NodePath viewport = null;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player/Cursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Assets.Scripts.User
{
public class Cursor : Spatial
public partial class Cursor : Spatial
{
public GeometryInstance Mesh { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player/DefaultRightHand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Godot;

public class DefaultRightHand : Spatial
public partial class DefaultRightHand : Spatial
{
private float handLocalOrigin;
private Vector2 mouseDelta = new Vector2();
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player/InputSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Assets.Scripts.User
{
public class InputSource : Camera
public partial class InputSource : Camera
{
private Tool _currentTool;
private bool isPinching;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player/MainCamera.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Godot;

public class MainCamera : ARVRCamera
public partial class MainCamera : ARVRCamera
{
public override void _Ready()
{
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/Player/Ray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Assets.Scripts.User
{
public class Ray : ImmediateGeometry
public class partial Ray : ImmediateGeometry
{
internal Camera Camera { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/SimpleText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Godot;

public class SimpleText : MeshInstance, IText
public partial class SimpleText : MeshInstance, IText
{
private readonly QuadMesh textMesh;
private readonly RichTextLabel label;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntime/Scripts/ThumbTip.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Godot;
using System;

public class ThumbTip : MeshInstance
public partial class ThumbTip : MeshInstance
{
Spatial indexTip;
public override void _Ready()
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Animation/Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace MixedRealityExtension.Animation
/// <summary>
/// Keyframe data for an animation (cacheable version)
/// </summary>
public class AnimationDataCached : Godot.Resource
public partial class AnimationDataCached : Godot.Resource
{
/// <summary>
/// The animation keyframe data
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Assets/AssetCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace MixedRealityExtension.Assets
/// <summary>
/// Default in-memory implementation of the asset cache interface
/// </summary>
public class AssetCache : Node, IAssetCache
public partial class AssetCache : Node, IAssetCache
{
protected class CacheItem
{
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace MixedRealityExtension.Core
/// <summary>
/// Class that represents an actor in a mixed reality extension app.
/// </summary>
internal sealed class Actor : MixedRealityExtensionObject, ICommandHandlerContext, IActor
internal sealed partial class Actor : MixedRealityExtensionObject, ICommandHandlerContext, IActor
{
private static readonly Reference actorScript = new Actor().GetScript();

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/ClippingBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace MixedRealityExtension.Core
{
public abstract class ClippingBase : Spatial
public abstract partial class ClippingBase : Spatial
{
private List<Spatial> meshInstances = new List<Spatial>();
private IActor parent;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Collider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum ColliderType
Mesh
}

internal class Collider : Area, ICollider
internal partial class Collider : Area, ICollider
{
private static readonly Reference colliderScript = new Collider().GetScript();

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Components/ActorComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace MixedRealityExtension.Core.Components
{
internal class ActorComponentBase : Spatial
internal partial class ActorComponentBase : Spatial
{
internal Actor AttachedActor { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Components/AnimationComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace MixedRealityExtension.Core.Components
{
internal class AnimationComponent : ActorComponentBase
internal partial class AnimationComponent : ActorComponentBase
{
private class AnimationData
{
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Components/BehaviorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace MixedRealityExtension.Core.Components
{
internal class BehaviorComponent : ActorComponentBase
internal partial class BehaviorComponent : ActorComponentBase
{
private BehaviorContextBase _behaviorContext;

Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/Components/LookAtComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace MixedRealityExtension.Core.Components
/// <summary>
/// Unity Behaviour to face toward a given target object
/// </summary>
internal class LookAtComponent : ActorComponentBase
internal partial class LookAtComponent : ActorComponentBase
{
private Spatial _targetObject;
private LookAtMode _lookAtMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace MixedRealityExtension.Core.Components
{
internal class MREAttachmentComponent : Spatial
internal partial class MREAttachmentComponent : Spatial
{
public Guid UserId { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions MREGodotRuntimeLib/Core/MixedRealityExtensionObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace MixedRealityExtension.Core
{
internal abstract class MixedRealityExtensionObject : Spatial, IMixedRealityExtensionObject
internal abstract partial class MixedRealityExtensionObject : Spatial, IMixedRealityExtensionObject
{
/// <inheritdoc />
public Guid Id { get; private set; }
Expand Down Expand Up @@ -48,7 +48,7 @@ protected virtual void OnStart()

protected virtual void OnAwake()
{

}

protected virtual void OnDestroyed()
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/TouchablePlane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace MixedRealityExtension.Core
{
internal class TouchablePlane : Spatial, ITouchableSurface
internal partial class TouchablePlane : Spatial, ITouchableSurface
{
/// <inheritdoc />
public float DebounceThreshold { get; set; } = 0.01f;
Expand Down
2 changes: 1 addition & 1 deletion MREGodotRuntimeLib/Core/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace MixedRealityExtension.Core
{
internal class User : MixedRealityExtensionObject, IUser
internal partial class User : MixedRealityExtensionObject, IUser
{
private IList<MixedRealityExtensionApp> _joinedApps = new List<MixedRealityExtensionApp>();

Expand Down
4 changes: 2 additions & 2 deletions addons/MREGodot/MRENode.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Godot;
using System;

public class MRENode : LaunchMRE
public partial class MRENode : LaunchMRE
{

}
2 changes: 1 addition & 1 deletion addons/MREGodot/MRENodePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Godot;

[Tool]
public class MRENodePlugin : EditorPlugin
public partial class MRENodePlugin : EditorPlugin
{
public override void _EnterTree()
{
Expand Down

0 comments on commit fab6788

Please sign in to comment.