protected override void Insert(EnvironmentObject obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("Object cannot be null");
     }
     base.Insert(obj);
 }
예제 #2
0
 protected override void Insert(Models.Objects.EnvironmentObject obj)
 {
     if (obj == null)
     {
         throw new ArgumentException("Advanced engine Insert object.", "Object cannot be null.");
     }
     base.Insert(obj);
 }
예제 #3
0
        public override void RespondToCollision(CollisionInfo collisionInfo)
        {
            var hitObjectGroup = collisionInfo.HitObject.CollisionGroup;

            if (hitObjectGroup == CollisionGroup.Ground ||
                hitObjectGroup == CollisionGroup.Snow)
            {
                this.snow = new Snow(this.Bounds.TopLeft.X, this.Bounds.TopLeft.Y - this.Bounds.Height,
                                     this.Bounds.Width, this.Bounds.Height);

                this.Exists = false;
            }
        }
예제 #4
0
        public override void Update()
        {
            base.Update();

            if (counter == 8)
            {
                counter = 0;
                this.Exists = false;
                this.expObj = new Explostion(this.Bounds.TopLeft.X, this.Bounds.TopLeft.Y + 1, 5, 5);
            }
            else
                counter++;
        }
예제 #5
0
        public override void Update()
        {
            base.Update();

            if (counter == 8)
            {
                counter     = 0;
                this.Exists = false;
                this.expObj = new Explostion(this.Bounds.TopLeft.X, this.Bounds.TopLeft.Y + 1, 5, 5);
            }
            else
            {
                counter++;
            }
        }
예제 #6
0
 protected virtual void Insert(EnvironmentObject obj)
 {
     this.objects.Add(obj);
 }