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


C# Entity.CreateProperty方法代码示例

本文整理汇总了C#中System.Entity.CreateProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.CreateProperty方法的具体用法?C# Entity.CreateProperty怎么用?C# Entity.CreateProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Entity的用法示例。


在下文中一共展示了Entity.CreateProperty方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateProperties

        public override void CreateProperties(Entity.InitialisationContext context)
        {
            this.texture = context.CreateProperty<TextureCube>("texture");
            this.brightness = context.CreateProperty<float>("brightness");
            this.gammaCorrect = context.CreateProperty<bool>("gamma_correct");

            base.CreateProperties(context);
        }
开发者ID:Quantumplation,项目名称:Myre,代码行数:8,代码来源:Skybox.cs

示例2: CreateProperties

        public override void CreateProperties(Entity.InitialisationContext context)
        {
            this.skyColour = context.CreateProperty<Vector3>("sky_colour");
            this.groundColour = context.CreateProperty<Vector3>("ground_colour");
            this.up = context.CreateProperty<Vector3>("up");

            base.CreateProperties(context);
        }
开发者ID:TomGillen,项目名称:Myre,代码行数:8,代码来源:AmbientLight.cs

示例3: CreateProperties

        public override void CreateProperties(Entity.ConstructionContext context)
        {
            base.CreateProperties(context);

            _string = context.CreateProperty(StringName, "");
            _font = context.CreateProperty(FontName);
            _model = context.CreateProperty(ModelInstance.ModelName);
            _thickness = context.CreateProperty(ThicknessName);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:9,代码来源:StringModelData.cs

示例4: CreateProperties

        public override void CreateProperties(Entity.ConstructionContext context)
        {
            Property<float> mass = context.CreateProperty<float>(MASS);
            Property<float> invMass = context.CreateProperty<float>(INVERSE_MASS);

            mass.PropertySet += (p, o, n) => { invMass.Value = 1 / mass.Value; };

            //trigger the changed property to initialise inverse mass to a useful value
            mass.Value = mass.Value;

            base.CreateProperties(context);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:12,代码来源:InverseMassCalculator.cs

示例5: CreateProperties

        public override void CreateProperties(Entity.InitialisationContext context)
        {
            var prefix = Name != null ? Name + "_" : string.Empty;
            radius = context.CreateProperty<float>(prefix + "radius");
            centre = context.CreateProperty<Vector2>(prefix + "centre");
            transform = context.CreateProperty<Matrix>("transform", Matrix.Identity);

            radius.PropertyChanged += _ => UpdateBounds();
            centre.PropertyChanged += _ => UpdateBounds();
            transform.PropertyChanged += _ => UpdateBounds();

            base.CreateProperties(context);
        }
开发者ID:Quantumplation,项目名称:Myre,代码行数:13,代码来源:Circle.cs

示例6: CreateProperties

        public override void CreateProperties(Entity.ConstructionContext context)
        {
            var prefix = Name != null ? Name + "_" : string.Empty;
            _transformProperty = context.CreateProperty<Matrix>("transform", Matrix.Identity);
            _verticesProperty = context.CreateProperty<Vector2[]>(prefix + "vertices");

            _transformProperty.PropertySet += (p, o, n) => ApplyTransform();
            _verticesProperty.PropertySet += (p, o, n) => ReadVertices(p);

            base.CreateProperties(context);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:11,代码来源:Polygon.cs

示例7: CreateProperties

 public override void CreateProperties(Entity.ConstructionContext context)
 {
     _defaultClip = context.CreateProperty(DefaultClipName);
     _rootBoneTransform = context.CreateProperty(RootTransformName, Transform.Identity);
     _enableRootBoneTranslationX = context.CreateProperty(RootTranslationXName, false);
     _enableRootBoneTranslationY = context.CreateProperty(RootTranslationYName, false);
     _enableRootBoneTranslationZ = context.CreateProperty(RootTranslationZName, false);
     _enableRootBoneRotation = context.CreateProperty(EnableRootRotationName, true);
     _enableRootBoneScale = context.CreateProperty(EnableRootScaleName, true);
 }
开发者ID:ylyking,项目名称:Myre,代码行数:10,代码来源:AnimationQueue.cs

示例8: CreateProperties

        public override void CreateProperties(Entity.InitialisationContext context)
        {
            var prefix = Name != null ? Name + "_" : string.Empty;
            transformProperty = context.CreateProperty<Matrix>("transform", Matrix.Identity);
            verticesProperty = context.CreateProperty<Vector2[]>(prefix + "vertices");

            transformProperty.PropertyChanged += p => ApplyTransform();
            verticesProperty.PropertyChanged += p => ReadVertices(p);

            base.CreateProperties(context);
        }
开发者ID:Quantumplation,项目名称:Myre,代码行数:11,代码来源:Polygon.cs

示例9: CreateProperties

        public override void CreateProperties(Entity.ConstructionContext context)
        {
            _frictionCoefficient = context.CreateProperty(new TypedName<float>("friction_coefficient"), default(float));
            _restitutionCoefficient = context.CreateProperty(new TypedName<float>("restitution_coefficient"), default(float));
            _sleeping = context.CreateProperty(new TypedName<bool>("sleeping"), default(bool));
            _group = context.CreateProperty(new TypedName<CollisionGroup>("collision_group"), default(CollisionGroup));

            _restitutionCoefficient.PropertySet += ValidateRestitution;
            _sleeping.PropertySet += WakeUp;

            base.CreateProperties(context);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:12,代码来源:Geometry.cs

示例10: CreateProperties

        public override void CreateProperties(Entity.InitialisationContext context)
        {
            this.colour = context.CreateProperty<Vector3>("colour");
            this.position = context.CreateProperty<Vector3>("position");
            this.direction = context.CreateProperty<Vector3>("direction");
            this.angle = context.CreateProperty<float>("angle");
            this.range = context.CreateProperty<float>("range");
            this.mask = context.CreateProperty<Texture2D>("mask");
            this.shadowResolution = context.CreateProperty<int>("shadow_resolution");

            base.CreateProperties(context);
        }
开发者ID:Quantumplation,项目名称:Myre,代码行数:12,代码来源:SpotLight.cs


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