Skip to content

Class: Rift ​

csharp
[DewResourceLink(ResourceLinkBy.None)]
public class Rift : Actor, ILogicUpdate, ICleanup, ICustomDestroyRoutine, IInteractable, IBanRoomNodesNearby

Fields ​

NameDeclarationDescription
afterOpenInteractableDelaypublic float afterOpenInteractableDelay
chargeDurationpublic float chargeDuration
fxActivatepublic GameObject fxActivate
fxChargepublic GameObject fxCharge
fxLockedpublic GameObject fxLocked
fxLooppublic GameObject fxLoop
fxOpenpublic GameObject fxOpen
fxUnlockedpublic GameObject fxUnlocked
softInstancepublic static Rift softInstance

Properties ​

NameDeclarationDescription
canInteractWithMousepublic bool canInteractWithMouse { get; }
focusDistancepublic float focusDistance { get; }
instancepublic static Rift instance { get; }
interactPivotpublic Transform interactPivot { get; }
isDestroyedOnRoomChangepublic override bool isDestroyedOnRoomChange { get; }
isLocked`[SaveVar(SaveVarFlags.Default)]
public bool isLocked { get; set; }`
isOpen`[SaveVar(SaveVarFlags.Default)]
public bool isOpen { get; set; }`

Methods ​

Awake() ​

csharp
protected override void Awake()

CanInteract(Entity) ​

csharp
public virtual bool CanInteract(Entity entity)

Parameters:

NameTypeDescription
entityEntity

Returns: bool

Close() ​

csharp
[Button]
public void Close()

OnCreate() ​

csharp
protected override void OnCreate()

OnDestroyActor() ​

csharp
protected override void OnDestroyActor()

OnInteractRift(Hero) ​

Called on server when a hero interacts with this rift.Return true to indicate success of interaction. (Will play activate effect)

csharp
protected virtual bool OnInteractRift(Hero hero)

Parameters:

NameTypeDescription
heroHero

Returns: bool

Open() ​

Open the rift with charging animation. If you wish to skip the animation, set the isOpen property directly.

csharp
[Button]
public void Open()

ShouldBeSavedWithRoom() ​

csharp
public override bool ShouldBeSavedWithRoom()

Returns: bool

Maintained by the Shape of Dreams Modding Community