Ignore:
Timestamp:
2016-06-17 10:43:15 (3 years ago)
Author:
armahiek
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/24/ArttuH/anythin/anythin/anythin/anythin.cs

    r7374 r7411  
    1313    LaserGun Zapper1; 
    1414    LaserGun Zapper2; 
    15     PlasmaCannon Sidecannon1; 
    16     PlasmaCannon Sidecannon2; 
     15    LaserGun Zapper3; 
     16    LaserGun Zapper4; 
    1717    Image playerim = LoadImage("rocket2"); 
    1818    Image Asteroid10 = LoadImage("asteroid"); 
     
    4949        Player1.Shape = Shape.Circle; 
    5050        Add(Player1); 
     51        AddCollisionHandler(Player1, Something); 
    5152 
    5253        //Creating Guns 
     
    6667        Zapper1.Image = null; 
    6768        Zapper1.FireRate = 1.0; 
    68         Zapper1.Angle += Angle.FromDegrees(10); 
     69        Zapper1.Angle += Angle.FromDegrees(5); 
    6970        Player1.Add(Zapper1); 
    7071        //Laser 3 
     
    7576        Zapper2.Image = null; 
    7677        Zapper2.FireRate = 1.0; 
    77         Zapper2.Angle += Angle.FromDegrees(-10); 
     78        Zapper2.Angle += Angle.FromDegrees(-5); 
    7879        Player1.Add(Zapper2); 
    79         //Side Plasmacannon 1 
    80         Sidecannon1 = new PlasmaCannon(0, 0); 
    81         Sidecannon1.InfiniteAmmo = true; 
    82         Sidecannon1.ProjectileCollision = Cannonhits; 
    83         Sidecannon1.CanHitOwner = false; 
    84         Sidecannon1.Image = null; 
    85         Sidecannon1.FireRate = 0.333333333333334; 
    86         Sidecannon1.Angle += Angle.FromDegrees(90); 
    87         Player1.Add(Sidecannon1); 
    88         //Side Plasmacannon 2 
    89         Sidecannon2 = new PlasmaCannon(0, 0); 
    90         Sidecannon2.InfiniteAmmo = true; 
    91         Sidecannon2.ProjectileCollision = Cannonhits; 
    92         Sidecannon2.CanHitOwner = false; 
    93         Sidecannon2.Image = null; 
    94         Sidecannon2.FireRate = 0.3333333333333334; 
    95         Sidecannon2.Angle += Angle.FromDegrees(-90); 
    96         Player1.Add(Sidecannon2); 
     80        //Laser 4 
     81        Zapper3 = new LaserGun(0, 0); 
     82        Zapper3.InfiniteAmmo = true; 
     83        Zapper3.ProjectileCollision = Hits; 
     84        Zapper3.CanHitOwner = false; 
     85        Zapper3.Image = null; 
     86        Zapper3.FireRate = 1.0; 
     87        Zapper3.Angle += Angle.FromDegrees(10); 
     88        Player1.Add(Zapper3); 
     89        //Laser 5 
     90        Zapper4 = new LaserGun(0, 0); 
     91        Zapper4.InfiniteAmmo = true; 
     92        Zapper4.ProjectileCollision = Hits; 
     93        Zapper4.CanHitOwner = false; 
     94        Zapper4.Image = null; 
     95        Zapper4.FireRate = 1.0; 
     96        Zapper4.Angle += Angle.FromDegrees(-10); 
     97        Player1.Add(Zapper4); 
     98 
    9799    } 
    98100    void Hits(PhysicsObject Laser, PhysicsObject Target) 
     
    102104        Killer.Value += 1; 
    103105    } 
    104     void Cannonhits(PhysicsObject Plasma, PhysicsObject Target) 
    105     {   //Plasmacannon hit detection 
    106          
    107         Target.Destroy(); 
    108         Killer.Value += 1; 
     106 
     107    void Something(PhysicsObject Car, PhysicsObject Target) 
     108    { 
     109        Car.Destroy(); 
     110        MessageDisplay.Add("R.I.P"); 
    109111    } 
    110112    void Assets() 
     
    189191        Keyboard.Listen(Key.Space, ButtonState.Down, Shoot1, null, Zapper1); 
    190192        Keyboard.Listen(Key.Space, ButtonState.Down, Shoot1, null, Zapper2); 
    191         Keyboard.Listen(Key.C, ButtonState.Down, Shoot2, null, Sidecannon1); 
    192         Keyboard.Listen(Key.C, ButtonState.Down, Shoot2, null, Sidecannon2); 
     193        Keyboard.Listen(Key.Space, ButtonState.Down, Shoot1, null, Zapper3); 
     194        Keyboard.Listen(Key.Space, ButtonState.Down, Shoot1, null, Zapper4); 
    193195        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    194196    } 
Note: See TracChangeset for help on using the changeset viewer.