Changeset 3889 for 2012


Ignore:
Timestamp:
2012-11-17 16:12:39 (7 years ago)
Author:
jotapoti
Message:

pelikerhossa tehdyt jutut.

Location:
2012/09-22/JariK/Jimmy The Survivor!/Jimmy The Survivor!
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • 2012/09-22/JariK/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy The Survivor!.csproj

    r3854 r3889  
    120120  </ItemGroup> 
    121121  <ItemGroup> 
    122     <ProjectReference Include="..\Jimmy_The_Survivor_Content\Jimmy_The_Survivor_Content.contentproj"> 
    123       <Name>Jimmy_The_Survivor_Content</Name> 
     122    <ProjectReference Include="..\Jimmy The Survivor!Content\Jimmy The Survivor!Content.contentproj"> 
     123      <Project>{89D249B7-FE4D-4D91-84AE-19FA1CF8C26A}</Project> 
     124      <Name>Jimmy The Survivor!Content %28Content%29</Name> 
    124125      <XnaReferenceType>Content</XnaReferenceType> 
    125126    </ProjectReference> 
  • 2012/09-22/JariK/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy_The_Survivor_.cs

    r3865 r3889  
    1313    PlasmaCannon Jimmyase; 
    1414    EasyHighScore topLista = new EasyHighScore(); 
    15  
     15    Image JimmynKuva = LoadImage("Jimmy"); 
     16    Image olionKuva = LoadImage("Vihollinen"); 
    1617    DoubleMeter elamaLaskuri; 
    17  
     18    Timer ajastin; 
    1819    public override void Begin() 
    19     { 
     20    {       
    2021        LuoElamaLaskuri(); 
    2122        LuoPistelaskuri(); 
    2223 
    2324        IsMouseVisible = true; 
    24         MultiSelectWindow alkuValikko = new MultiSelectWindow("Jimmy The Survivor", "Start game", "Top ten", "Exit game"); 
    25         
     25        MultiSelectWindow alkuValikko = new MultiSelectWindow("Briefing:", 
     26            "You're deep on enemy territory, you've got only this plasmarifle and you must survive. Click here to start","Exit"); 
     27         
    2628        alkuValikko.AddItemHandler(0, AloitaPeli); 
    27         alkuValikko.AddItemHandler(1, ParhaatPisteet); 
    28         alkuValikko.AddItemHandler(2, Exit); 
     29        alkuValikko.AddItemHandler(1, Exit); 
    2930        alkuValikko.DefaultCancel = 2; 
    3031        Add(alkuValikko); 
     
    3536        Jimmy.Shape = Shape.Ellipse; 
    3637        Jimmy.Restitution = 1.0; 
     38        Jimmy.Mass = 40.0; 
    3739        Add(Jimmy); 
    38         AddCollisionHandler(Jimmy, VihollinenTormasi); 
     40        AddCollisionHandler(Jimmy, "Vihollinen", VihollinenTormasi);   
    3941        Jimmyase = new PlasmaCannon(30, 10); 
    40         Jimmyase.Ammo.Value = 1000; 
    4142        Jimmy.Add(Jimmyase); 
    42  
    43        
    44  
    45  
    46  
     43        Jimmyase.CanHitOwner = true; 
     44        Jimmy.Image = JimmynKuva; 
     45        Keyboard.Listen(Key.W, ButtonState.Pressed, LiikutaJimmya, null, new Vector(0, 998765)); 
     46        Keyboard.Listen(Key.A, ButtonState.Down, 
     47        LiikutaJimmya, null, new Vector(-4500, 0)); 
     48        Keyboard.Listen(Key.D, ButtonState.Down, 
     49        LiikutaJimmya, null, new Vector(4500, 0));   
     50        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
     51        Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", Jimmyase); 
     52        Mouse.ListenMovement(0.1, Tahtaa, "Tähtää aseella");   
     53         
    4754        Surface alaReuna = Surface.CreateBottom(Level); 
    4855        Add(alaReuna); 
     
    5764        oikeareuna.Color = Color.LightBlue; 
    5865        Add(oikeareuna); 
    59         FollowerBrain seuraajanAivot = new FollowerBrain(Jimmy); 
    60         seuraajanAivot.Speed = 10; 
    61         seuraajanAivot.Active = true; 
    62         seuraajanAivot.DistanceClose = 2000; 
    63         seuraajanAivot.StopWhenTargetClose = false; 
    64         seuraajanAivot.TargetClose += mitaTapahtuuKunOllaanLahella; 
    65         Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
    66         Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", Jimmyase); 
    67         Mouse.ListenMovement(0.1, Tahtaa, "Tähtää aseella"); 
     66        
    6867        LisaaVihollisia(); 
    6968    } 
    70     void CreateBorders() 
    71     { 
    72      
    73     } 
    74     void VihollinenTormasi(PhysicsObject Jimmy, PhysicsObject kohde) 
    75     { 
    76        //AddCollisionHandler(Jimmy, "Vihollinen", CollisionHandler.AddMeterValue(elamaLaskuri, -1)); 
     69    void VihollinenTormasi(PhysicsObject Jimmy, PhysicsObject Vihollinen) 
     70    {       
    7771        elamaLaskuri.Value -= 1; 
    7872         
     
    8781        } 
    8882 
    89         ase.FireRate = 10; 
     83        ase.FireRate = 4; 
    9084    } 
    9185    void AmmusOsui(PhysicsObject ammus, PhysicsObject Vihollinen) 
     
    111105    void LisaaVihollisia() 
    112106    { 
    113         Timer ajastin = new Timer(); 
    114         ajastin.Interval = 0.5; 
     107        ajastin = new Timer(); 
     108        ajastin.Interval = 1.0; 
    115109        ajastin.Timeout += LisaaVihollinen; 
    116110        ajastin.Start(); 
     
    121115        Vihollinen.Shape = Shape.Ellipse; 
    122116        Vihollinen.Color = Color.Blue; 
    123         Vihollinen.Position = new Vector(250, 30); 
     117        Vihollinen.Position = Level.GetRandomPosition(); 
    124118        Add(Vihollinen); 
    125119        Vihollinen.Tag = "Vihollinen"; 
    126  
    127  
    128  
    129  
    130  
    131     } 
    132     void mitaTapahtuuKunOllaanLahella() 
    133     { 
    134          
     120        Vihollinen.Image = olionKuva; 
    135121 
    136122    } 
     
    139125    } 
    140126    void ParhaatPisteet() 
    141     { 
     127    {  
    142128    } 
     129 
    143130     
    144131    IntMeter pisteLaskuri; 
     
    169156                break; 
    170157            case 1: 
    171                 // ParhaatPisteet(); 
    172                 break; 
    173             case 2: 
    174158                Exit(); 
    175159                break; 
     
    180164    { 
    181165        elamaLaskuri = new DoubleMeter(10); 
    182         elamaLaskuri.MaxValue = 100; 
     166        elamaLaskuri.MaxValue = 10; 
    183167        elamaLaskuri.LowerLimit += ElamaLoppui; 
    184168         
     
    194178    { 
    195179        ClearGameObjects(); 
    196         MessageDisplay.Add("Jimmy you fool! You can't never stop my army! Muahhahhahhahhahhaa! "); 
     180        MessageDisplay.Add("Jimmy you fool! You can never stop me and my army of evil balls! "); 
    197181        topLista.EnterAndShow(pisteLaskuri.Value); 
    198182        topLista.HighScoreWindow.Closed += delegate { Exit(); }; 
    199  
     183        ajastin.Stop(); 
     184        MessageDisplay.MessageTime = new TimeSpan(0, 0, 40); 
    200185    } 
    201186 
    202    
    203187 
     188    void LiikutaJimmya(Vector vektori) 
     189    { 
     190        Jimmy.Push(vektori); 
     191    } 
    204192} 
  • 2012/09-22/JariK/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy The Survivor!/obj/x86/Debug/Jimmy The Survivor!.csproj.FileListAbsolute.txt

    r3865 r3889  
    1515C:\MyTemp\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\Jimmy The Survivor!.exe 
    1616C:\MyTemp\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\Jimmy The Survivor!.pdb 
     17C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Jimmy The Survivor!.exe 
     18C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Jimmy The Survivor!.pdb 
     19C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Jypeli.dll 
     20C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Jypeli.xml 
     21C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\ResolveAssemblyReference.cache 
     22C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     23C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\Jimmy The Survivor!.exe 
     24C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\obj\x86\Debug\Jimmy The Survivor!.pdb 
     25C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\maali.xnb 
     26C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\norsu.xnb 
     27C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\tahti.xnb 
     28C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\Jimmy.xnb 
     29C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\kentta1.xnb 
     30C:\MyTemp\ohjelmointikerho\JariK\Jimmy The Survivor!\Jimmy The Survivor!\Jimmy The Survivor!\bin\x86\Debug\Content\Vihollinen.xnb 
  • 2012/09-22/JariK/Jimmy The Survivor!/Jimmy The Survivor!/Jimmy The Survivor!Content/Jimmy The Survivor!Content.contentproj

    r3854 r3889  
    6666    </Compile> 
    6767  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="Jimmy.png"> 
     70      <Name>Jimmy</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
     75  <ItemGroup> 
     76    <Compile Include="Vihollinen.png"> 
     77      <Name>Vihollinen</Name> 
     78      <Importer>TextureImporter</Importer> 
     79      <Processor>TextureProcessor</Processor> 
     80    </Compile> 
     81  </ItemGroup> 
    6882  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6983  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.