Пример #1
0
        public TntCrate(Vector2 spritePosition, string spriteSheetName = "tntCrate", DrawManager.Layer drawLayer = DrawManager.Layer.Playground) : base(spritePosition, spriteSheetName, drawLayer)
        {
            Animation.IsActive = false;
            brokenCrate        = new ExplosionCrate(spritePosition - new Vector2(0, 12), "tntExplosion", "tntExplosion");
            countdownStarted   = false;
            clipCountdown      = AudioManager.GetAudioClip("tntCountdown");

            // minVelocityHitY = 35f;
        }
Пример #2
0
        public NitroCrate(Vector2 spritePosition, string spriteSheetName = "nitroCrate", DrawManager.Layer drawLayer = DrawManager.Layer.Playground) : base(spritePosition, spriteSheetName, drawLayer)
        {
            sprite.scale -= new Vector2(0.15f, 0.15f);

            brokenCrate = new ExplosionCrate(spritePosition - new Vector2(0, 24), "nitroExplosion", "nitroExplosion");
            ((ExplosionCrate)brokenCrate).PlayerDeathAnim = Player.State.DeathAngel;

            minInpactToDetectYCollision = 0f;
            CanWalkable = false;
        }