/// <summary> /// Call Draw() on the children /// </summary> public override void Draw(SpriteBatch batch) { for (int i = 0; i < children.Count(); i++) { ZObject child = children[i]; child.Draw(batch); } }
public override void Enter() { for (int i = 0; i < children.Count(); i++) { ZObject child = children[i]; child.Enter(); } }
/// <summary> /// Call Update() on the children /// </summary> public override void Update(GameTime gameTime) { for (int i = 0; i < children.Count(); i++) { ZObject child = children[i]; child.Update(gameTime); } }
/// <summary> /// Call LoadContent() on the children /// </summary> public override void LoadContent() { for (int i = 0; i < children.Count(); i++) { ZObject child = children[i]; child.LoadContent(); } }
private static int InternalSorter(ZObject a, ZObject b) { if (a.z > b.z) { return(1); } else if (a.z < b.z) { return(-1); } else { return(0); } }
public static void YZ(ZObject target, Vector2 position) => target.z = position.Y + target.depthYOffset;
public void RemoveChild(ZObject child) { children.Remove(child); }
/// <summary> /// Add a ZObject to this group. /// </summary> /// <param name="child"></param> public void AddChild(ZObject child) { children.Add(child); }