public AnyOfType MyScatterer { get; set; }
public class MyComponent : Component
{
[Sync] public NetDictionary MyBoolTable { get; set; } = new();
public void SetBoolState( string key, bool state )
{
if ( IsProxy ) return;
MyBoolTable[key] = state;
}
}
public class MyComponent : Component
{
[Sync] public NetList MyIntegerList { get; set; } = new();
public void AddNumber( int number )
{
if ( IsProxy ) return;
MyIntegerList.Add( number );
}
}
RealTimeSince lastUsed = 0;
if ( lastUsed > 10 ) { /*Do something*/ }
RealTimeUntil nextAttack = 10;
if ( nextAttack ) { /*Do something*/ }
float4 CornerRadius < Attribute( "BorderRadius" ); >;
Texture2D g_tColor < Attribute( "Texture" ); SrgbRead( false ); >;
TimeSince lastUsed = 0;
if ( lastUsed > 10 ) { /*Do something*/ }
TimeUntil nextAttack = 10;
if ( nextAttack ) { /*Do something*/ }
BindSystem.Build.Set( this, "BoolValue" ).From( this, "StringValue" );
@-----------------@
| |
| |
Object A Object B
SamplerState mySampler < Attribute("sampler"); >;
C# binding:
var sampler = new SamplerState
{
Filter = FilterMode.Trilinear,
AddressModeU = TextureAddressMode.Wrap,
AddressModeV = TextureAddressMode.Wrap,
AddressModeW = TextureAddressMode.Clamp,
MaxAnisotropy = 4
};
Graphics.Attributes.Set("sampler", sampler);
P1 (Position)
P1 (In) ▼ P1 (Out)
o──────═══X═══──────o
───/ \───
──/ \──
-/ \-
/ \
| |
P0 X X P2