Skip to content

Commit

Permalink
Merge pull request #29 from Xlinka/main
Browse files Browse the repository at this point in the history
Merge into my branch
  • Loading branch information
Frozenreflex authored May 1, 2024
2 parents ee08ad1 + 6a0110b commit 7d7ce54
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
28 changes: 28 additions & 0 deletions ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections.Generic;
using FrooxEngine;
using FrooxEngine.CommonAvatar;
using ProtoFlux.Core;
using ProtoFlux.Runtimes.Execution;

namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users.Avatar
{
[ContinuouslyChanging]
[NodeCategory("Obsidian/Avatar")]
public class AvatarRootSlot : ObjectFunctionNode<ExecutionContext, Slot>
{
public readonly ObjectInput<User> User;

protected override Slot Compute(ExecutionContext context)
{
User user = User.Evaluate(context);
if (user == null) return null;

Slot slot = user.Root.Slot;
List<AvatarRoot> list = new List<AvatarRoot>();
slot.GetFirstDirectComponentsInChildren(list);
if (list.Count == 0) return null;

return list[0].Slot;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using ProtoFlux.Core;
using ProtoFlux.Runtimes.Execution;

namespace ProtoFlux.Users.Avatar
namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Interaction
{
[ContinuouslyChanging]
[NodeCategory("ProtoFlux/Obsidian/Avatar")]
[NodeCategory("Obsidian/Interaction")]
public class FindGrabbableFromSlot : ObjectFunctionNode<ExecutionContext, IGrabbable>
{
public readonly ObjectInput<Slot> Slot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Locomotion
{
[ContinuouslyChanging]
[NodeCategory("Obsidian/Locomotion")]
[NodeCategory("Obsidian/Users/Status")]
public class IsUserInNoClipNode : ValueFunctionNode<FrooxEngineContext, bool>
{
public readonly ObjectInput<User> User;
Expand Down
7 changes: 3 additions & 4 deletions ProjectObsidian/ProtoFlux/Users/Status/IsUserInSeatedMode.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using ProtoFlux.Core;
using ProtoFlux.Runtimes.Execution;

namespace FrooxEngine.ProtoFlux.Status
namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users.Status
{
[ContinuouslyChanging]
[NodeCategory("ProtoFlux/Obsidian/Status")]
public class IsUserInSeatedModeNode : ValueFunctionNode<ExecutionContext, bool>
[NodeCategory("Obsidian/Users/Status")]
public class IsUserInSeatedModeNode : ValueFunctionNode<FrooxEngineContext, bool>
{
public readonly ObjectInput<User> User;

Expand Down
2 changes: 1 addition & 1 deletion ProjectObsidian/ProtoFlux/Utility/WriteToLogNode.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Elements.Core;
using FrooxEngine;
using ProtoFlux.Core;
using ProtoFlux.Runtimes.Execution;
using System.Threading.Tasks;
using FrooxEngine.ProtoFlux;
using ProtoFlux.Runtimes.Execution;

namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Utility
{
Expand Down

0 comments on commit 7d7ce54

Please sign in to comment.