public PhysicsContext(PhysicsContext other) { entities = new HashSet <Entity>(other.entities); affinities = new List <Affinity>(other.affinities); layers = new HashSet <LayerMask>(other.layers); colliders = new HashSet <Collider2D>(other.colliders); }
public virtual void Update(PhysicsContext c) { Update(c.entities); Update(c.affinities); Update(c.layers); Update(c.colliders); }
private void Main() { Stack.Background = SettingApp.BackgroundColor; List <Formul> forl; Stack.Children.Clear(); using (PhysicsContext db = new PhysicsContext()) { forl = db.Formuls.ToList(); } //flipView.Items.Add(new StackPanel()); foreach (Formul fr in forl) { if (fr.addF == 1) { Formul formTemp = fr; Stack.Children.Add(addFormyl(formTemp)); } } }
protected override IPhysicsContext CreatePhysicsContext() { var physicsContext = new PhysicsContext(World) { HeadFeature = new PhysicsFeature() }; return(physicsContext); }
public Contexts() { game = new GameContext(); input = new InputContext(); physics = new PhysicsContext(); var postConstructors = System.Linq.Enumerable.Where( GetType().GetMethods(), method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute)) ); foreach (var postConstructor in postConstructors) { postConstructor.Invoke(this, null); } }
public static extern PhysicsBody newDynamicBody(PhysicsContext ctx, vec2 intl_pos, vec2 intl_size);
public static extern PhysicsBody newGroundBody(PhysicsContext ctx, vec2 intl_pos, vec2 intl_size);
public static PhysicsBody GroundBody(PhysicsContext ctx, vec2 intl_pos, vec2 intl_size) { return(newGroundBody(ctx, intl_pos * PHYSICS_SCALING_TOPHYS, intl_size * PHYSICS_SCALING_TOPHYS)); }
static extern void physicsContext_step(PhysicsContext ctx, float timestep);
static extern float physicsContext_getGravity(PhysicsContext ctx);
public BspToBulletConverter(PhysicsContext context) { this.context = context; }
public void Awake() { context = new PhysicsContext(); originalPosition = transform.position; }