Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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;
                }
            }
        }
Exemplo n.º 4
0
 public void RegisterCollisionWith(AyoBasic other)
 {
     _others.Add(other);
 }
Exemplo n.º 5
0
 public void WhileOverlapping(AyoBasic other, Action Callback)
 {
     _otherWhileOverlapping.Add(other, Callback);
 }
Exemplo n.º 6
0
 public void Add(AyoBasic entity)
 {
     Entities.Add(entity);
 }
Exemplo n.º 7
0
 public Animator(AyoBasic owner)
 {
     Owner = owner;
 }