public void RemoveBody(BodyState body) { /* * int index = this.owner.IndexOf(owner); * if (index != -1) * { * this.bodyList.RemoveAt(index); * this.owner.RemoveAt(index); * this.spriteState.RemoveAt(index); * } */ }
public Entity AddBody(float x = 0f, float y = 0f) { bodyState = new BodyState(x, y); scene.Physics.AddBody(bodyState); // TODO: Should I replace this clunky effeciency-focused linking with accessing each other through Entity/parent? if (spriteState != null) { spriteState.AddBody(bodyState); } if (textState != null) { textState.AddBody(bodyState); } return(this); }
public void AddBody(BodyState body) { this.body = body; }
public void AddBody(BodyState body) { this.bodyList.Add(body); }