当前位置: 首页>>代码示例>>C#>>正文


C# Entity.CreateProperty方法代码示例

本文整理汇总了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);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:8,代码来源:Skybox.cs

示例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);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:8,代码来源:AmbientLight.cs

示例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);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:9,代码来源:SunLight.cs

示例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);
 }
开发者ID:xoxota99,项目名称:Myre,代码行数:9,代码来源:PointLight.cs

示例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);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:12,代码来源:Transform.cs

示例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);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:13,代码来源:Circle.cs

示例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);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:14,代码来源:SpotLight.cs

示例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);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:15,代码来源:SpotLight.cs


注:本文中的Entity.CreateProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。