Пример #1
0
 public MoveController(ScreenManager screen, CharacterStats characterStats, int index)
     : base(screen)
 {
     Img = new ImageController(Screen, characterStats.moveAnimations, 120, false);
     Img.FramesPerRow = 6;
     Img.SetFrameRectangle(100, 100);
     Img.OriginDefault = new Vector2(50, 50);
     moves = new List<MoveModel>();
     explotions = new List<Explotion>();
     playerIndex = index;
 }
Пример #2
0
        public void LoadCharacterGameSounds(ContentManager content, CharacterStats character)
        {
            getSound(content, character.sound_jump);
            getSound(content, character.sound_kill);
            getSound(content, character.sound_won);

            if(character.x != null)
                getSound(content, character.x.hitSound);
            if (character.xLR != null)
                getSound(content, character.xLR.hitSound);
            if (character.xDown != null)
                getSound(content, character.xDown.hitSound);
            if (character.xUp != null)
                getSound(content, character.xUp.hitSound);

            if (character.a != null)
                getSound(content, character.a.hitSound);
            if (character.aLR != null)
                getSound(content, character.aLR.hitSound);
            if (character.aDown != null)
                getSound(content, character.aDown.hitSound);
            if (character.aUp != null)
                getSound(content, character.aUp.hitSound);
        }
Пример #3
0
 public CharacterController(ScreenManager screen, GamepadController pad, Vector2 startPos, int countDown)
     : base(screen)
 {
     stats = pad.PlayerModel.SelectedCharacter;
     model = new CharacterModel(pad, startPos, countDown, stats);
     moves = new MoveController(Screen, stats, pad.PlayerIndex);
     this.pad = pad;
 }
Пример #4
0
 public CharacterView(ContentManager content, string assetName, int frameWidth, int frameHeight, float xPos, float yPos, CharacterStats stats)
     : base(content, assetName, frameWidth, frameHeight, xPos, yPos)
 {
     this.stats = stats;
 }
Пример #5
0
 public CharacterModel(GamepadController pad, Vector2 startPos, int countDown, CharacterStats stats)
 {
     position = startPos;
     playerIndex = pad.PlayerIndex;
     resetTimeLeft = countDown * 1000;
     maxSpeed = stats.maxSpeed;
     acceleration = stats.acceleration;
     weight = stats.weight;
     JumpStartVelocity = stats.jumpStartVelocity;
 }