public bool IsTouchingBottom(AyoBasic other) { return(Bounds.Top + Owner.Speed.Y < other.HitBox.Bounds.Bottom && Bounds.Bottom > other.HitBox.Bounds.Bottom && Bounds.Right > other.HitBox.Bounds.Left && Bounds.Left < other.HitBox.Bounds.Right); }
public bool IsTouchingRight(AyoBasic other) { return(Bounds.Left + Owner.Speed.X < other.HitBox.Bounds.Right && Bounds.Right > other.HitBox.Bounds.Right && Bounds.Bottom > other.HitBox.Bounds.Top && Bounds.Top < other.HitBox.Bounds.Bottom); }
public void Initialize(AyoBasic owner) { Owner = owner; _otherWhileOverlapping = new Dictionary <AyoBasic, Action>(); _others = new List <AyoBasic>(); if (Width == 0 && Height == 0) { if (Owner.Graphic != null) { Width = Owner.Graphic.Width; Height = Owner.Graphic.Height; } } }
public void RegisterCollisionWith(AyoBasic other) { _others.Add(other); }
public void WhileOverlapping(AyoBasic other, Action Callback) { _otherWhileOverlapping.Add(other, Callback); }
public void Add(AyoBasic entity) { Entities.Add(entity); }
public Animator(AyoBasic owner) { Owner = owner; }