Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }
Beispiel #7
0
 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);
 }
Beispiel #8
0
        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);
        }
Beispiel #9
0
        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);
        }
Beispiel #10
0
        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);
        }