Esempio n. 1
0
        public bool IsPassable(CollideInformation info)
        {
            if (!_locked || _owner.ToBeRemoved)
                return true;

            return false;
        }
Esempio n. 2
0
        public bool IsPassable(CollideInformation info)
        {
            // Source check
            if (info.Collider == _owner)
                return true;

            // Altitude / height check
            if (info.Collider.Altitude + info.Collider.BodyHeight < _owner.Altitude ||
                info.Collider.Altitude > _owner.Altitude + _owner.BodyHeight)
                return true;

            return false;
        }
Esempio n. 3
0
        public bool OnCollide(CollideInformation info)
        {
            if (_charges == 0)
            {
                _owner.ToBeRemoved = true;
                return true;
            }
            if (!info.IsPlayer || _isOnCD || _owner.ToBeRemoved)
                return true;

            ((Player)info.Collider).GiveItem(_loot);

            if (_oneTime)
            {
                _owner.ToBeRemoved = true;
            }
            else
            {
                _charges = Math.Max(-1, _charges--);
                _pushItemCooldown.StartCounter("cdDrop");
                _isOnCD = true;
            }
            return true;
        }
Esempio n. 4
0
        public Vector2 OnCollide(CollideInformation info)
        {
            if (_charges == 0)
                _owner.ToBeRemoved = true;

            ((Player)info.Collider).GiveItem(_loot);

            if (_oneTime)
            {
                _owner.ToBeRemoved = true;
            }
            else
            {
                _charges = Math.Max(-1, _charges--);
                _pushItemCooldown.StartCounter("cdDrop");
                _isOnCD = true;
            }

            return Vector2.Zero;
        }
Esempio n. 5
0
 public bool IsPassable(CollideInformation info)
 {
     // Pickup item will never block
     return true;
 }
Esempio n. 6
0
        public Vector2 OnCollide(CollideInformation info)
        {
            // Set flag that the JumpPoint collided in this update
            _collided = true;

            // If you want that only the Player may use JumpPoint uncomment these 2 lines
            if (!info.IsPlayer)
                return Vector2.Zero;

            // If the JumpPoint is locked and the counter didnt reach 0 refresh the counter
            if (_locked)
            {
                Owner.CM.StartCounter(_cUpdater, true, false);
                return Vector2.Zero;
            }

            _collider = info.Collider;

            // If the JumpPoint is not locked execute jump and lock the target JumpPoint
            (_target.CollideModule as JumpPoint).LockJP(_collider);
            return _target.Position - _collider.Position;
        }
Esempio n. 7
0
 public bool IsPassable(CollideInformation info)
 {
     return true;
 }
Esempio n. 8
0
 public bool OnCollide(CollideInformation info)
 {
     return false;
 }
Esempio n. 9
0
 public void Collide(Entity source)
 {
     if (_mCollideModule != null)
     {
         CollideInformation info = new CollideInformation() { Collider = source, IsPlayer = source is Player };
         _mCollideModule.OnCollide(info);
     }
 }
Esempio n. 10
0
        public Vector2 OnCollide(CollideInformation info)
        {
            if (_locked)
            {
                if (Player.Instance.Inventory.HasKey(_areaID))
                {
                    _owner.ToBeRemoved = true;
                    return Vector2.Zero;
                }
                else
                {
                    return Vector2.Zero;
                }
            }
            else
            {
                _owner.ToBeRemoved = true;
            }

            return Vector2.Zero;
        }
Esempio n. 11
0
        public Vector2 OnCollide(CollideInformation info)
        {
            // Do nothing

            return Vector2.Zero;
        }