public override void CreateProperties(Entity.ConstructionContext context) { _property = context.CreateProperty(PropertyName); _curve = new BoundedFloat16PropertyCurve(_property); base.CreateProperties(context); }
public void CreateProperties(Entity.ConstructionContext context) { _team = context.CreateProperty(PropertyNames.TeamOwner); _position = context.CreateProperty(PropertyNames.Position); _velocity = context.CreateProperty(PropertyNames.Velocity); _orientation = context.CreateProperty(PropertyNames.Orientation); // ReSharper disable HeapView.BoxingAllocation _bearing = context.CreateProperty(new Myre.TypedName <float>($"gun_turret_bearing_{_index}")); _elevation = context.CreateProperty(new Myre.TypedName <float>($"gun_turret_elevation_{_index}")); // ReSharper restore HeapView.BoxingAllocation _bearingCurve = new BoundedFloat16PropertyCurve(_bearing); _elevationCurve = new BoundedFloat16PropertyCurve(_elevation); }