本文整理汇总了C#中Entity.CreateProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.CreateProperty方法的具体用法?C# Entity.CreateProperty怎么用?C# Entity.CreateProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity
的用法示例。
在下文中一共展示了Entity.CreateProperty方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_texture = context.CreateProperty(TextureName);
_brightness = context.CreateProperty(BrightnessName);
_gammaCorrect = context.CreateProperty(GammaCorrectName);
base.CreateProperties(context);
}
示例2: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_skyColour = context.CreateProperty(SkyColourName, Color.LightSkyBlue.ToVector3().FromXNA());
_groundColour = context.CreateProperty(GroundColourName, Color.LightGray.ToVector3().FromXNA());
_up = context.CreateProperty(UpName, Vector3.UnitY);
base.CreateProperties(context);
}
示例3: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_colour = context.CreateProperty(ColourName, Color.LightBlue.ToVector3());
_direction = context.CreateProperty(DirectionName, Vector3.Down);
_shadowResolution = context.CreateProperty(ShadowResolutionName);
_active = context.CreateProperty(ActiveName, true);
base.CreateProperties(context);
}
示例4: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_colour = context.CreateProperty(ColourName);
_position = context.CreateProperty(PositionName);
_range = context.CreateProperty(RangeName);
_active = context.CreateProperty(ActiveName, true);
base.CreateProperties(context);
}
示例5: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_position = context.CreateProperty(new TypedName<Vector2>(PhysicsProperties.POSITION));
_rotation = context.CreateProperty(new TypedName<float>(PhysicsProperties.ROTATION));
_transform = context.CreateProperty(new TypedName<Matrix>("transform"));
_inverseTransform = context.CreateProperty(new TypedName<Matrix>("inverse_transform"));
_position.PropertySet += (p, o, n) => _isDirty = true;
_rotation.PropertySet += (p, o, n) => _isDirty = true;
base.CreateProperties(context);
}
示例6: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
var prefix = Name != null ? Name + "_" : string.Empty;
_radius = context.CreateProperty<float>(prefix + "radius", default(float));
_centre = context.CreateProperty<Vector2>(prefix + "centre", default(Vector2));
_transform = context.CreateProperty<Matrix>("transform", Matrix.Identity);
_radius.PropertySet += (p, o, n) => UpdateBounds();
_centre.PropertySet += (p, o, n) => UpdateBounds();
_transform.PropertySet += (p, o, n) => UpdateBounds();
base.CreateProperties(context);
}
示例7: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_colour = context.CreateProperty(_colourName);
_position = context.CreateProperty(_positionName);
_direction = context.CreateProperty(_directionName);
_angle = context.CreateProperty(_angleName);
_range = context.CreateProperty(_rangeName);
_mask = context.CreateProperty(_maskName);
_shadowResolution = context.CreateProperty(_shadowResolutionName);
_active = context.CreateProperty(_activeName, true);
_falloff = context.CreateProperty(_falloffName, 1);
base.CreateProperties(context);
}
示例8: CreateProperties
public override void CreateProperties(Entity.ConstructionContext context)
{
_colour = context.CreateProperty(ColourName);
_position = context.CreateProperty(PositionName);
_direction = context.CreateProperty(DirectionName);
_up = context.CreateProperty(UpName, Vector3.UnitY);
_angle = context.CreateProperty(AngleName);
_range = context.CreateProperty(RangeName);
_mask = context.CreateProperty(MaskName);
_shadowResolution = context.CreateProperty(ShadowResolutionName);
_active = context.CreateProperty(ActiveName, true);
_falloff = context.CreateProperty(FalloffName, 1);
base.CreateProperties(context);
}