Have TASable auto fetch parent if it is null
This commit is contained in:
parent
8906d69760
commit
eb668bfd63
|
@ -2,6 +2,7 @@ using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
public partial class TASable : Node
|
public partial class TASable : Node
|
||||||
{
|
{
|
||||||
|
@ -38,6 +39,11 @@ public partial class TASable : Node
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
if (this._assignedRigidBody3D is null)
|
||||||
|
{
|
||||||
|
this._assignedRigidBody3D = this.GetParent<RigidBody3D>();
|
||||||
|
}
|
||||||
|
|
||||||
TAS_System TAS = GetNode<TAS_System>("/root/TAS_System");
|
TAS_System TAS = GetNode<TAS_System>("/root/TAS_System");
|
||||||
|
|
||||||
TAS.FrameIncremented += this.OnFrameIncremented;
|
TAS.FrameIncremented += this.OnFrameIncremented;
|
||||||
|
|
Loading…
Reference in New Issue