コード例 #1
0
ファイル: Rocket.cs プロジェクト: BlueBananasaurus/BP
 protected override void AfterCollision(Map map, Vector2Object hit)
 {
     Explosion.Explode(hit.Vector2, _damage);
     if (_wet == false)
     {
         _trail.LeftParticle();
     }
 }
コード例 #2
0
ファイル: CarryBase.cs プロジェクト: BlueBananasaurus/BP
 protected void Pressure(Inpc inpc)
 {
     if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true)
     {
         Game1.mapLive.MapNpcs.Remove(inpc);
         Explosion.Explode(Boundary.Origin, 32);
     }
 }
コード例 #3
0
ファイル: PlayerMech.cs プロジェクト: BlueBananasaurus/BP
        public void Update(List <Inpc> npcs)
        {
            _time.Update();
            _bubbleTime.Update();

            if (_resolver.InWater == true)
            {
                if (_bubbleTime.Ready == true)
                {
                    _bubbleTime.Reset();
                }
            }

            _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0.05f), new Vector2(0.005f), new Vector2(0.3f), Game1.mapLive.MapMovables);

            if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true)
            {
                Explosion.Explode(Boundary.Origin, 128);
                Game1.mapLive.MapNpcs.Remove(this);
            }

            if (_resolver.TouchTop || _resolver.InWater || _resolver.TouchBottomMovable)
            {
                WalkingVisible = true;

                _rotLeg += Game1.Delta / 25 * Velocity.X;

                if (Math.Abs(Velocity.X - _resolver.VelocityReceived.X) < 0.05f)
                {
                    WalkingVisible = false;
                }
            }
            else
            {
                WalkingVisible = false;
            }

            if (WalkingVisible == true)
            {
                if (Velocity.X < 0)
                {
                    _walkSin -= Game1.Delta / 16 * Velocity.X;
                }
                if (Velocity.X > 0)
                {
                    _walkSin += Game1.Delta / 16 * Velocity.X;
                }
            }
        }
コード例 #4
0
        public void Update(List <Inpc> npcs)
        {
            _time.Update();
            _bubbleTime.Update();

            if (_resolver.InWater == true)
            {
                if (_bubbleTime.Ready == true)
                {
                    _bubbleTime.Reset();
                }
            }

            _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0.05f), new Vector2(0.005f), new Vector2(0.3f), Game1.mapLive.MapMovables);

            if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true)
            {
                Explosion.Explode(Boundary.Origin, 128);
                Game1.mapLive.MapNpcs.Remove(this);
            }
        }
コード例 #5
0
 private void Explode(MapTreeHolder map, List <Inpc> npcs)
 {
     Explosion.Explode(Boundary.Origin, _damage);
     Game1.mapLive.MapProjectiles.Remove(this);
 }