Skip to content

Commit

Permalink
Merge pull request #18 from DerpyNewbie/feature/add-collision-invokers
Browse files Browse the repository at this point in the history
Add collision related invokers
  • Loading branch information
DerpyNewbie authored Nov 3, 2024
2 parents e039956 + a1c18b7 commit 07047ee
Show file tree
Hide file tree
Showing 29 changed files with 3,548 additions and 1 deletion.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using UnityEngine;
using VRC.SDKBase;

namespace DerpyNewbie.Common.Invoker
{
[AddComponentMenu("Newbie Commons/Invoker/Collision/On Collision Enter")]
public class OnCollisionEnterInvoker : CommonInvokerBase
{
[SerializeField]
private bool isTriggeringOnLocalOnly = true;

private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject == null) return;

if (isTriggeringOnLocalOnly && !Networking.IsOwner(collision.gameObject))
return;
Invoke();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 07047ee

Please sign in to comment.