Changeset 7440 for 2016/24


Ignore:
Timestamp:
2016-06-17 12:05:32 (7 years ago)
Author:
karkaite
Message:

Game is kind of completed

Location:
2016/24/HaseebS/Dreamcast
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • 2016/24/HaseebS/Dreamcast/Dreamcast/Dreamcast/Dreamcast.cs

    r7428 r7440  
    8686        character.Tag = "character"; 
    8787        characterHealth = 5; 
     88 
    8889        AddCollisionHandler(character, "character2", PlayerIsHit); 
    8990        Add(character); 
     
    102103        character2.Image = Image.Mirror(player2picture); 
    103104        character2.Tag = "character2"; 
     105 
    104106        AddCollisionHandler(character2, "character", PlayerIsHit); 
     107 
    105108        character2Health = 5; 
    106109        Add(character2); 
     
    115118        Player1Gun.MaxAmmoLifetime = TimeSpan.FromSeconds(0.9); 
    116119        Player1Gun.ProjectileCollision = ProjectileHit; 
    117         //Add(Player1Gun); 
     120         
     121         
    118122        character.Weapon = Player1Gun; 
    119123    } 
     
    124128        Player2Gun.ProjectileCollision = ProjectileHit; 
    125129        Player2Gun.MaxAmmoLifetime = TimeSpan.FromSeconds(0.9); 
     130         
     131        
    126132        character2.Weapon = Player2Gun; 
    127133    } 
     
    130136        ammunition.Destroy(); 
    131137    } 
    132     void Shootthegun(AssaultRifle weapon) 
     138    void Shootthegun(AssaultRifle weapon, String tag) 
    133139    { 
    134140        PhysicsObject ammo = weapon.Shoot(); 
    135141        if (ammo != null) 
    136142        { 
     143            ammo.Tag = "ammo"; 
    137144            ammo.Size *= 0.8; 
    138145        } 
     
    146153        Keyboard.Listen(Key.D,ButtonState.Down, movement, "Player1 will turn right", character,new Vector(100.0, 0.0)); 
    147154  
    148         Keyboard.Listen(Key.LeftControl, ButtonState.Pressed, Shootthegun, "Shoot button", Player1Gun); 
     155        Keyboard.Listen(Key.LeftControl, ButtonState.Pressed, Shootthegun, "Shoot button", Player1Gun, "character"); 
    149156 
    150157         
     
    152159        Keyboard.Listen(Key.Left, ButtonState.Down, movement, "Player 2 will turn left", character2, new Vector(-100.0, 0.0));    
    153160        Keyboard.Listen(Key.Right, ButtonState.Down, movement, "Player 2 will move right", character2, new Vector(100.0, 0.0));  
    154         Keyboard.Listen(Key.Space, ButtonState.Pressed, Shootthegun, "Shoot button for Player2", Player2Gun ); 
     161        Keyboard.Listen(Key.Space, ButtonState.Pressed, Shootthegun, "Shoot button for Player2", Player2Gun, "character2" ); 
    155162 
    156163        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     
    193200        Gravity = new Vector(0.0, -420.0); 
    194201        Level.Background.Image = wallpaper; 
    195         IsFullScreen = true; 
     202        //IsFullScreen = true; 
    196203        
    197204 
  • 2016/24/HaseebS/Dreamcast/Dreamcast/Dreamcast/Dreamcast.csproj.Debug.cachefile

    r7428 r7440  
    33Content\Player1.xnb 
    44Content\cool.xnb 
     5Content\gunsound.xnb 
    56Content\Hassebproject.txt 
Note: See TracChangeset for help on using the changeset viewer.