Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added/Updated #27

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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