Class Entity
- Namespace
- VoxelPlayground.Entity
- Assembly
- GamePlay.dll
public class Entity : MonoBehaviour
- Inheritance
-
object
Entity
- Derived
-
- Extension Methods
-
Fields
_rigidbodies
protected Rigidbody[] _rigidbodies
Field Value
- Rigidbody[]
CanHighlight
[TabGroup("Interaction", false, 0)]
public bool CanHighlight
Field Value
- bool
connectedEntity
protected List<Entity> connectedEntity
Field Value
- List<Entity>
disableVoxelDestructionUntil
public float disableVoxelDestructionUntil
Field Value
- float
dontDestroyOnSceneClear
[TabGroup("Interaction", false, 0)]
public bool dontDestroyOnSceneClear
Field Value
- bool
dysfunctional
protected bool dysfunctional
Field Value
- bool
enableFreeze
[TabGroup("Interaction", false, 0)]
public bool enableFreeze
Field Value
- bool
entityId
[NonSerialized]
public int entityId
Field Value
- int
freezeState
[TabGroup("Interaction", false, 0)]
public Entity.FreezeState freezeState
Field Value
- Entity.FreezeState
GRIP_POINT_STR
public const string GRIP_POINT_STR = "GripPoint"
Field Value
- string
gripPoint
[NonSerialized]
public Transform gripPoint
Field Value
- Transform
isActivated
protected bool isActivated
Field Value
- bool
isPin
[TabGroup("Interaction", false, 0)]
public bool isPin
Field Value
- bool
needUseGravity
[TabGroup("Interaction", false, 0)]
public bool needUseGravity
Field Value
- bool
notifier
protected EntityNotifier notifier
Field Value
- EntityNotifier
PositionIterationOnGrab
public const int PositionIterationOnGrab = 14
Field Value
- int
registryId
[NonSerialized]
public string registryId
Field Value
- string
sfxGain
[NonSerialized]
[ShowInInspector]
public float sfxGain
Field Value
- float
soundTag
Field Value
- SoundTag
teamFlag
public Entity.TeamFlag teamFlag
Field Value
- Entity.TeamFlag
VelocityIterationOnGrab
public const int VelocityIterationOnGrab = 10
Field Value
- int
voxelData
protected VoxelVolume voxelData
Field Value
- VoxelVolume
voxelDestructor
protected VoxelDestructor voxelDestructor
Field Value
- VoxelDestructor
Properties
Dysfunctional
public virtual bool Dysfunctional { get; set; }
Property Value
- bool
IsGrabbed
public bool IsGrabbed { get; }
Property Value
- bool
isGrabbedIndirect
public bool isGrabbedIndirect { get; }
Property Value
- bool
itemName
public string itemName { get; }
Property Value
- string
MainRigidbody
public Rigidbody MainRigidbody { get; }
Property Value
- Rigidbody
Rigidbodies
public Rigidbody[] Rigidbodies { get; }
Property Value
- Rigidbody[]
stillTimer
[ShowInInspector]
public float stillTimer { get; protected set; }
Property Value
- float
trans
public Transform trans { get; }
Property Value
- Transform
Methods
Activate()
[Button]
public virtual void Activate()
AddVoxelDestructor(VoxelDestructor)
public void AddVoxelDestructor(VoxelDestructor destructor)
Parameters
destructor VoxelDestructor
Awake()
protected virtual void Awake()
CancelFreeze()
public void CancelFreeze()
ControlledUpdate(float)
public virtual void ControlledUpdate(float deltaTime)
Parameters
deltaTime float
Deactivate()
[Button]
public virtual void Deactivate()
Equals(object)
public override bool Equals(object obj)
Parameters
obj object
Returns
- bool
Equals(Entity)
public bool Equals(Entity other)
Parameters
other Entity
Returns
- bool
FixedUpdateSleepingTime(float)
protected void FixedUpdateSleepingTime(float deltaTime)
Parameters
deltaTime float
Freeze(bool)
public void Freeze(bool temp = false)
Parameters
temp bool
GetConnectedEntity()
[Button]
public virtual List<Entity> GetConnectedEntity()
Returns
- List<Entity>
GetHashCode()
public override int GetHashCode()
Returns
- int
GetNeighborJoints(Rigidbody)
public List<ConfigurableJoint> GetNeighborJoints(Rigidbody rigidbody)
Parameters
rigidbody Rigidbody
Returns
- List<ConfigurableJoint>
GetPinchCenterPoint(Rigidbody)
public virtual Vector3 GetPinchCenterPoint(Rigidbody hitRb)
Parameters
hitRb Rigidbody
Returns
- Vector3
GetScaledSize()
public Vector3 GetScaledSize()
Returns
- Vector3
GetSolidBlockCount()
public int GetSolidBlockCount()
Returns
- int
GetTotalMass()
public float GetTotalMass()
Returns
- float
GetVoxelData()
public VoxelVolume GetVoxelData()
Returns
- VoxelVolume
GetVoxelDataCenterPoint()
public Vector3 GetVoxelDataCenterPoint()
Returns
- Vector3
GetVoxelDestructor()
public VoxelDestructor GetVoxelDestructor()
Returns
- VoxelDestructor
IgnoreEntityCollision(Entity, bool, List<Collider>)
public void IgnoreEntityCollision(Entity otherEntity, bool doIgnore, List<Collider> extraColliders = null)
Parameters
otherEntity Entity
doIgnore bool
extraColliders List<Collider>
Initialize(EntityNotifier, EntityManager)
public virtual void Initialize(EntityNotifier notifier, EntityManager entityManager)
Parameters
notifier EntityNotifier
entityManager EntityManager
IsActivated()
public bool IsActivated()
Returns
- bool
IsEnemyFaction()
public bool IsEnemyFaction()
Returns
- bool
IsPlayerFaction()
public bool IsPlayerFaction()
Returns
- bool
ModifyLocalScale(float)
public void ModifyLocalScale(float scale)
Parameters
scale float
Notify(VoxelEvent, int, params object[])
public void Notify(VoxelEvent voxelEvent, int affectedVoxelCount, params object[] args)
Parameters
voxelEvent VoxelEvent
affectedVoxelCount int
args object[]
OnBeStabbed(Entity, bool)
public virtual void OnBeStabbed(Entity stabber, bool isStabbed)
Parameters
stabber Entity
isStabbed bool
OnDestroy()
public virtual void OnDestroy()
OnIgnite(Vector3, float)
public virtual void OnIgnite(Vector3 center, float radius)
Parameters
center Vector3
radius float
OnReset()
public virtual void OnReset()
Pin()
RecoverLocalScale()
public void RecoverLocalScale()
RefreshRigidbodiesRefs()
public void RefreshRigidbodiesRefs()
RemoveUnFreezeSchedule()
public void RemoveUnFreezeSchedule()
RemoveVoxelDestructors(VoxelDestructor[])
public void RemoveVoxelDestructors(VoxelDestructor[] destructorsToRemove)
Parameters
destructorsToRemove VoxelDestructor[]
RestoreRigidbodiesDrags()
public void RestoreRigidbodiesDrags()
SetActivate(bool)
public void SetActivate(bool activate)
Parameters
activate bool
SetActivateForConnected(bool)
[Button]
public void SetActivateForConnected(bool activate)
Parameters
activate bool
SetGravityEnable(bool)
public virtual void SetGravityEnable(bool enable)
Parameters
enable bool
SetHighlight(bool)
[Button]
public void SetHighlight(bool toHighlight)
Parameters
toHighlight bool
SetIsKinematic(bool)
public void SetIsKinematic(bool enable)
Parameters
enable bool
SetRigidbodiesDragsFreeze()
public void SetRigidbodiesDragsFreeze()
SetTargetColliderAndNeighborsIgnore(Collider, Collider, bool)
public void SetTargetColliderAndNeighborsIgnore(Collider attackerCollider, Collider hitCollider, bool ignore)
Parameters
attackerCollider Collider
hitCollider Collider
ignore bool
SetVisible(bool)
[Button]
public void SetVisible(bool visible)
Parameters
visible bool
SetVoxelColliderIgnore(Collider, bool)
public void SetVoxelColliderIgnore(Collider collider, bool ignore)
Parameters
collider Collider
ignore bool
Start()
protected virtual void Start()
Teleport(Vector3, Quaternion)
public virtual void Teleport(Vector3 position, Quaternion rotation)
Parameters
position Vector3
rotation Quaternion
ToggleActivate()
public void ToggleActivate()
TogglePin()
TryRemoveVelocity()
public void TryRemoveVelocity()
UnPin()
UpdatePhysGravityKinematic()
public void UpdatePhysGravityKinematic()