Пример #1
0
 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);
      * }
      */
 }
Пример #2
0
 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);
 }
Пример #3
0
 public void AddBody(BodyState body)
 {
     this.body = body;
 }
Пример #4
0
 public void AddBody(BodyState body)
 {
     this.bodyList.Add(body);
 }