Class PICustomData
DMK v10 replacement for FiringCtx. This class is subclassed via runtime MSIL generation to
provide efficient lookup of arbitrary fields.
Inheritance
System.Object
PICustomData
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public class PICustomData
Fields
boundFloats
Declaration
public readonly Dictionary<int, float> boundFloats
Field Value
Type |
Description |
Dictionary<System.Int32, System.Single> |
|
boundInts
Declaration
public readonly Dictionary<int, int> boundInts
Field Value
Type |
Description |
Dictionary<System.Int32, System.Int32> |
|
boundRV2s
Declaration
public readonly Dictionary<int, V2RV2> boundRV2s
Field Value
Type |
Description |
Dictionary<System.Int32, V2RV2> |
|
boundV2s
Declaration
public readonly Dictionary<int, Vector2> boundV2s
Field Value
Type |
Description |
Dictionary<System.Int32, Vector2> |
|
boundV3s
Declaration
public readonly Dictionary<int, Vector3> boundV3s
Field Value
Type |
Description |
Dictionary<System.Int32, Vector3> |
|
bpiAsCustomDataTypeAlias
Declaration
public const string bpiAsCustomDataTypeAlias = "$_typedCustomData"
Field Value
Type |
Description |
System.String |
|
bullet
Declaration
Field Value
Type |
Description |
System.Nullable<Bullet> |
|
culledBulletTime
Declaration
public float culledBulletTime
Field Value
Type |
Description |
System.Single |
|
Empty
Declaration
public static readonly PICustomData Empty
Field Value
envFrame
Declaration
Field Value
Type |
Description |
EnvFrame |
|
firer
Declaration
public BehaviorEntity? firer
Field Value
Type |
Description |
System.Nullable<BehaviorEntity> |
|
laserController
Declaration
public CurvedTileRenderLaser? laserController
Field Value
Type |
Description |
System.Nullable<CurvedTileRenderLaser> |
|
playerBullet
Declaration
public PlayerBullet? playerBullet
Field Value
Type |
Description |
System.Nullable<PlayerBullet> |
|
playerController
Declaration
public PlayerController? playerController
Field Value
Type |
Description |
System.Nullable<PlayerController> |
|
typeIndex
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Properties
Bullet
If this data struct is being used for a Bullet GameObject (such as pathers or lasers), then this points to the bullet.
Declaration
public Bullet Bullet { get; }
Property Value
Constructor
Declaration
public ConstructedType Constructor { get; }
Property Value
Type |
Description |
ConstructedType |
|
Firer
Declaration
public BehaviorEntity Firer { get; }
Property Value
Type |
Description |
BehaviorEntity |
|
Laser
If this data struct is being used for a Laser, then this points to the laser.
Declaration
public CurvedTileRenderLaser Laser { get; }
Property Value
Type |
Description |
CurvedTileRenderLaser |
|
OptionFirer
Declaration
public FireOption OptionFirer { get; }
Property Value
Type |
Description |
FireOption |
|
PlayerController
Declaration
public PlayerController PlayerController { get; }
Property Value
Type |
Description |
PlayerController |
|
Methods
Clone()
Declaration
public virtual PICustomData Clone()
Returns
Clone_NoAlloc()
Clone this object. The data type is pooled, so this method has amortized O(0) allocations.
Declaration
public PICustomData Clone_NoAlloc()
Returns
ContainsDynamic(TExArgCtx, Type, String)
Declaration
public static TEx ContainsDynamic(TExArgCtx tac, Type typ, string name)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.Type |
typ |
|
System.String |
name |
|
Returns
ContainsDynamic<T>(TExArgCtx, String)
Declaration
public static Expression ContainsDynamic<T>(TExArgCtx tac, string name)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
Returns
Type |
Description |
Expression |
|
Type Parameters
CopyInto(PICustomData)
Copy this object's variables into another object of the same type.
Not virtual, so only this class' variables are copied.
Declaration
public PICustomData CopyInto(PICustomData copyee)
Parameters
Returns
CopyIntoVirtual(PICustomData)
Copy this object's variables into another object of the same type.
Virtual, so subclasses should implement this by casting the argument to their own type
and then calling their own CopyInto(PICustomData).
Declaration
public virtual PICustomData CopyIntoVirtual(PICustomData copyee)
Parameters
Returns
Dispose()
Declaration
GetDict(Expression, Type)
Declaration
public static Expression GetDict(Expression fctx, Type typ)
Parameters
Type |
Name |
Description |
Expression |
fctx |
|
System.Type |
typ |
|
Returns
Type |
Description |
Expression |
|
GetDynamicKey(Type, String)
Declaration
public static int GetDynamicKey(Type t, string name)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
System.String |
name |
|
Returns
Type |
Description |
System.Int32 |
|
GetIfDefined<T>(TExArgCtx, String, TEx<T>)
Create an expression that retrieves a field with name and type
if it exists, else returns .
Declaration
public static Ex GetIfDefined<T>(TExArgCtx tac, string name, TEx<T> deflt)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
TEx<T> |
deflt |
|
Returns
Type Parameters
GetValue(TExArgCtx, Type, String)
Create an expression that retrieves a field with name .
If the subclass of PICustomData is known, then does this by direct field access,
otherwise uses the ReadT jumptable lookup.
Declaration
public static Ex GetValue(TExArgCtx tac, Type t, string name)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.Type |
t |
|
System.String |
name |
|
Returns
GetValue<T>(TExArgCtx, String)
Declaration
public static Ex GetValue<T>(TExArgCtx tac, string name)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
Returns
Type Parameters
GetValueDynamic(TExArgCtx, Type, String)
Declaration
public static TEx GetValueDynamic(TExArgCtx tac, Type typ, string name)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.Type |
typ |
|
System.String |
name |
|
Returns
GetValueDynamic<T>(TExArgCtx, String, Nullable<TEx<T>>)
Declaration
public static Expression GetValueDynamic<T>(TExArgCtx tac, string name, TEx<T>? deflt = null)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
System.Nullable<TEx<T>> |
deflt |
|
Returns
Type |
Description |
Expression |
|
Type Parameters
HasFloat(Int32)
Declaration
public virtual bool HasFloat(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
HasInt(Int32)
Declaration
public virtual bool HasInt(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
HasV2RV2(Int32)
Declaration
public virtual bool HasV2RV2(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
HasVector2(Int32)
Declaration
public virtual bool HasVector2(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
HasVector3(Int32)
Declaration
public virtual bool HasVector3(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
New(Nullable<GenCtx>)
Create a new instance of the base PICustomData class.
Only use this if you don't need to store any bound variables.
Declaration
public static PICustomData New(GenCtx? gcx = null)
Parameters
Type |
Name |
Description |
System.Nullable<GenCtx> |
gcx |
|
Returns
ReadFloat(Int32)
Declaration
public virtual float ReadFloat(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Single |
|
ReadInt(Int32)
Declaration
public virtual int ReadInt(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Int32 |
|
ReadV2RV2(Int32)
Declaration
public virtual V2RV2 ReadV2RV2(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
ReadVector2(Int32)
Declaration
public virtual Vector2 ReadVector2(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
ReadVector3(Int32)
Declaration
public virtual Vector3 ReadVector3(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
RevertToGCX(BehaviorEntity)
Declaration
public GenCtx RevertToGCX(BehaviorEntity exec)
Parameters
Type |
Name |
Description |
BehaviorEntity |
exec |
|
Returns
SetValue(TExArgCtx, Type, String, Ex)
Create an expression that sets the value of a field with name .
If the subclass of PICustomData is known, then does this by direct field access,
otherwise uses the WriteT jumptable lookup.
Declaration
public static Ex SetValue(TExArgCtx tac, Type t, string name, Ex val)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.Type |
t |
|
System.String |
name |
|
Ex |
val |
|
Returns
SetValue<T>(TExArgCtx, String, Ex)
Declaration
public static Ex SetValue<T>(TExArgCtx tac, string name, Ex val)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
Ex |
val |
|
Returns
Type Parameters
SetValueDynamic(TExArgCtx, Type, String, Expression)
Declaration
public static Expression SetValueDynamic(TExArgCtx tac, Type typ, string name, Expression val)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.Type |
typ |
|
System.String |
name |
|
Expression |
val |
|
Returns
Type |
Description |
Expression |
|
SetValueDynamic<T>(TExArgCtx, String, Expression)
Declaration
public static Expression SetValueDynamic<T>(TExArgCtx tac, string name, Expression val)
Parameters
Type |
Name |
Description |
TExArgCtx |
tac |
|
System.String |
name |
|
Expression |
val |
|
Returns
Type |
Description |
Expression |
|
Type Parameters
UploadAdd(IReadOnlyList<(Type, String)>, GenCtx)
Retrieve the variables defined in from
and set them on this object.
Declaration
public void UploadAdd(IReadOnlyList<(Type, string)> boundVars, GenCtx gcx)
Parameters
Type |
Name |
Description |
IReadOnlyList<System.ValueTuple<System.Type, System.String>> |
boundVars |
|
GenCtx |
gcx |
|
UploadWrite(Type, String, GenCtx, Boolean)
Declaration
public void UploadWrite(Type ext, string varName, GenCtx gcx, bool useDefaultValue = false)
Parameters
Type |
Name |
Description |
System.Type |
ext |
|
System.String |
varName |
|
GenCtx |
gcx |
|
System.Boolean |
useDefaultValue |
|
WriteFloat(Int32, Single)
Declaration
public virtual float WriteFloat(int id, float val)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Single |
val |
|
Returns
Type |
Description |
System.Single |
|
WriteInt(Int32, Int32)
Declaration
public virtual int WriteInt(int id, int val)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
val |
|
Returns
Type |
Description |
System.Int32 |
|
WriteV2RV2(Int32, V2RV2)
Declaration
public virtual V2RV2 WriteV2RV2(int id, V2RV2 val)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
V2RV2 |
val |
|
Returns
WriteVector2(Int32, Vector2)
Declaration
public virtual Vector2 WriteVector2(int id, Vector2 val)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Vector2 |
val |
|
Returns
WriteVector3(Int32, Vector3)
Declaration
public virtual Vector3 WriteVector3(int id, Vector3 val)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Vector3 |
val |
|
Returns