Esempio n. 1
0
 public override void loadContent()
 {
     base.loadContent();
     m_bling = new ImageManager("Images//Prop//Consumables//Sparkle");
     m_bling.setAnimationSpeed(18);
     m_collectSound = new Sound("Game/Tagrej");
 }
Esempio n. 2
0
 public override void loadContent()
 {
     base.loadContent();
     if (m_pairedVentilationId != 0 && m_pairedVentilation == null)
     {
         m_pairedVentilation = (VentilationDrum)Game.getInstance().getState().getObjectById(m_pairedVentilationId);
     }
     m_backImg = new ImageManager("Images//Tile//Ventilation//Straight//aventil_short_tile_w_floor");
     m_collisionShape = new CollisionRectangle(30, 30, 42, 12, m_position);
     if (s_unlockSound == null)
     {
         s_unlockSound = new Sound("Game//ledgegrab");
     }
 }
Esempio n. 3
0
        public override void loadContent()
        {
            base.loadContent();
            if (!(Game.getInstance().getState() is DevelopmentState))
            {
                addHearts();
            }

            string[] t_heroSprites = Directory.GetFiles("Content//Images//Sprite//Hero//");
            foreach (string t_file in t_heroSprites)
            {
                string[] t_splitFile = Regex.Split(t_file, "//");
                string[] t_extless = t_splitFile[t_splitFile.Length - 1].Split('.');
                if (t_extless[1].Equals("xnb"))
                {
                    Game.getInstance().Content.Load<Texture2D>("Images//Sprite//Hero//" + t_extless[0]);
                }
            }

            m_img = new ImageManager("Images//Sprite//Hero//hero_stand");

            m_interactionArrow = new GameObject(new CartesianCoordinate(new Vector2(15, -70), m_position), "Images//GUI//GameGUI//interaction", m_layer - 0.1f, m_listLayer);
            setInteractionVisibility(false);
            m_interactionArrow.getImg().setAnimationSpeed(20f);
            m_standHitBox	= new CollisionRectangle(0, 0, 70, 127, m_position);
            m_rollHitBox	= new CollisionRectangle(0, 0, 70, 72, m_position);
            m_slideBox		= new CollisionRectangle(0, m_standHitBox.getOutBox().Height / 2, m_standHitBox.getOutBox().Width, 1, m_position);
            m_hangHitBox	= new CollisionRectangle(0, 0, 70, 80, m_position);
            m_swingHitBox	= new CollisionRectangle(-36, 0, 70, 127, m_position);
            m_collisionShape = m_standHitBox;
            m_ventilationDirection	= new List<Direction>();
            m_upDownList			= new List<Direction>();
            m_leftRightList			= new List<Direction>();
            m_noneList				= new List<Direction>();
            m_lastVentilationDirection = Direction.None;
            m_upDownList.Add(Direction.Up);
            m_upDownList.Add(Direction.Down);
            m_leftRightList.Add(Direction.Left);
            m_leftRightList.Add(Direction.Right);
            m_noneList.Add(Direction.None);
            m_playerCurrentSpeed = PLAYERSPEED;
            m_swingSpeed = 0;
            m_slideTimer = 0;
            m_currentVentilationImage = VENTIDLEIMAGE;
            m_currentSwingingImage = "hero_swing_still";
            m_position.plusYWith(-1);
            m_facingRight = true;

            m_hitSound1 = new Sound("Game//FirstHit");
            m_hitSound2 = new Sound("Game//SecHit");
            m_hitSound3 = new Sound("Game//LethalHit");
            m_jumpSound = new Sound("Game//hopp");
            m_landSound = new Sound("Game//landa2");
            m_landSound.setVolume(10);
            m_slideSound = new Sound("Game//32584__redjim__fabric-rustling");
            m_slideSound.setLooping(true);
            m_hangSound = new Sound("Game/ledgegrab");
            m_stepSound = new Sound("Game//walk");
            m_runSound = new Sound("Game//walk4");
            m_hideSound = new Sound("Game//hopp");
            m_ventilationMoveSound = new Sound("Game//ledgegrab");
            m_ladderSound = new Sound("Game//ledgegrab");
            m_rollSound = new Sound("Game//hopp");
            m_ledgeClimbSound = new Sound("Game//tygklatter");
            m_windowActionSound = new Sound("Game//tygklatter2");

            m_img.m_animationEvent += new ImageManager.animationDelegate(changedSubImage);
        }
Esempio n. 4
0
 public virtual void loadContent()
 {
     m_color = Color.White;
     m_img = new ImageManager(m_spritePath);
     m_rotationPoint = m_img.getSize() / 2;
     m_visible = true;
 }