Changeset 6954 for 2015/30/EliasHy


Ignore:
Timestamp:
2015-07-23 10:44:28 (4 years ago)
Author:
elhytone
Message:

Peli juttuja

Location:
2015/30/EliasHy
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • 2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/SpaceAdventure.cs

    r6951 r6954  
    88 
    99public class SpaceAdventure : PhysicsGame 
    10 { 
     10{    
    1111    PhysicsObject pelaaja; 
    1212    AssaultRifle ase; 
     
    2020    Image Vihollinenalus = LoadImage("enemy ship 2"); 
    2121 
     22 
    2223    IntMeter pistelaskuri; 
     24    DoubleMeter elamaLaskuri; 
    2325 
    2426    double eteenpain = 500; 
     
    2628 
    2729    public override void Begin() 
    28     { 
     30 
     31    { 
     32        Valikko(); 
     33        
     34    } 
     35 
     36    void Valikko() 
     37    { 
     38        MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 
     39        "Aloita peli", "Parhaat pisteet", "Lopeta"); 
     40        Add(alkuValikko); 
     41        alkuValikko.AddItemHandler(0, AloitaPeli); 
     42        //alkuValikko.AddItemHandler(1, ParhaatPisteet); 
     43        alkuValikko.AddItemHandler(2, Exit); 
     44        Level.Background.CreateStars(); 
     45    } 
     46 
     47    void AloitaPeli() 
     48 
     49    { 
     50        ClearAll(); 
    2951        LuoKentta(); 
    3052 
     
    4163        LuoPistelaskuri(); 
    4264    } 
     65 
    4366 
    4467    void LiikutaPelaajaa(double voima, int miten) 
     
    102125        pelaaja.AngularDamping = 0.9; 
    103126        pelaaja.Tag = "pelaaja"; 
     127        AddCollisionHandler(pelaaja, "Asteroidi",delegate(PhysicsObject A, PhysicsObject B)  
     128        { 
     129            PelaajaVahingoittuu(A, B, 3); 
     130        } ); 
     131 
     132        AddCollisionHandler(pelaaja, "pahis", delegate(PhysicsObject A, PhysicsObject B) 
     133        { 
     134            PelaajaVahingoittuu(A, B, 1); 
     135        }); 
     136 
     137        AddCollisionHandler(pelaaja, "pahis2", delegate(PhysicsObject A, PhysicsObject B) 
     138        { 
     139            PelaajaVahingoittuu(A, B, 3); 
     140        }); 
     141         
     142        elamaLaskuri = new DoubleMeter(10); 
     143        elamaLaskuri.MaxValue = 10; 
     144        elamaLaskuri.LowerLimit += ElamaLoppui; 
     145 
     146        ProgressBar elamaPalkki = new ProgressBar(150, 20); 
     147        elamaPalkki.X = Screen.Left + 150; 
     148        elamaPalkki.Y = Screen.Top - 20; 
     149        elamaPalkki.BindTo(elamaLaskuri); 
     150        Add(elamaPalkki); 
    104151 
    105152        ase = new AssaultRifle(1, 1); 
     
    130177        Asteroidi.Position = paikka; 
    131178        Add(Asteroidi); 
     179        Asteroidi.Mass = 100; 
     180        Asteroidi.Tag = "Asteroidi"; 
     181 
    132182 
    133183    } 
     
    194244        } 
    195245    } 
     246    void ElamaLoppui() 
     247    { 
     248        MessageDisplay.Add("Pelaaja tuhoutui"); 
     249        pelaaja.Destroy(); 
     250        Timer.SingleShot(1, Valikko); 
     251         
     252 
     253 
     254    } 
     255    void PelaajaVahingoittuu(PhysicsObject Pelaaja,PhysicsObject Pahis, int Vahinko) 
     256    { 
     257        elamaLaskuri.Value -= Vahinko; 
     258 
     259    } 
     260 
    196261} 
  • 2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventure/obj/x86/Debug/SpaceAdventure.csproj.FileListAbsolute.txt

    r6951 r6954  
     1C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb 
     2C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb 
     3C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb 
     4C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb 
     5C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb 
     6C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb 
     7C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb 
     8C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb 
     9C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb 
     10C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb 
    111C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.exe 
    212C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.pdb 
     
    717C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.exe 
    818C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.pdb 
    9 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb 
    10 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb 
    11 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb 
    12 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb 
    13 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb 
    14 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb 
    15 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb 
    16 C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb 
    17 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb 
    18 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb 
    19 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb 
    20 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb 
    21 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb 
    22 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb 
    23 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb 
    24 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb 
    25 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.exe 
    26 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\SpaceAdventure.pdb 
    27 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Jypeli.dll 
    28 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Jypeli.xml 
    29 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.csprojResolveAssemblyReference.cache 
    30 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
    31 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.exe 
    32 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\obj\x86\Debug\SpaceAdventure.pdb 
    33 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb 
    34 C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb 
  • 2015/30/EliasHy/SpaceAdventure/SpaceAdventure/SpaceAdventureContent/obj/x86/Debug/ContentPipeline.xml

    r6951 r6954  
    88      <Processor>TextureProcessor</Processor> 
    99      <Options>None</Options> 
    10       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb</Output> 
    11       <Time>2015-07-23T09:45:06.3199068+03:00</Time> 
     10      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool tausta.xnb</Output> 
     11      <Time>2015-07-22T12:37:40.9096187+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1717      <Processor>TextureProcessor</Processor> 
    1818      <Options>None</Options> 
    19       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb</Output> 
    20       <Time>2015-07-23T09:45:06.3229068+03:00</Time> 
     19      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool alus.xnb</Output> 
     20      <Time>2015-07-21T14:12:05.8146469+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2626      <Processor>TextureProcessor</Processor> 
    2727      <Options>None</Options> 
    28       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb</Output> 
    29       <Time>2015-07-23T09:45:06.3069068+03:00</Time> 
     28      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool asteroid bu.xnb</Output> 
     29      <Time>2015-07-21T14:55:03.3357265+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3535      <Processor>TextureProcessor</Processor> 
    3636      <Options>None</Options> 
    37       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb</Output> 
    38       <Time>2015-07-23T09:45:06.3329068+03:00</Time> 
     37      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolhyvisalus.xnb</Output> 
     38      <Time>2015-07-22T11:35:17.1851187+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4444      <Processor>TextureProcessor</Processor> 
    4545      <Options>None</Options> 
    46       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb</Output> 
    47       <Time>2015-07-23T09:45:06.3259068+03:00</Time> 
     46      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\coolasteroidya.xnb</Output> 
     47      <Time>2015-07-21T14:55:35.1129265+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    5353      <Processor>TextureProcessor</Processor> 
    5454      <Options>None</Options> 
    55       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb</Output> 
    56       <Time>2015-07-23T09:45:06.4709068+03:00</Time> 
     55      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cool space.xnb</Output> 
     56      <Time>2015-07-22T11:05:32.8286354+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    6262      <Processor>TextureProcessor</Processor> 
    6363      <Options>None</Options> 
    64       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb</Output> 
    65       <Time>2015-07-23T09:45:06.3039068+03:00</Time> 
     64      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\Boss Ship_zpspn6osve5.xnb</Output> 
     65      <Time>2015-07-22T12:56:39.8323187+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7171      <Processor>TextureProcessor</Processor> 
    7272      <Options>None</Options> 
    73       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb</Output> 
    74       <Time>2015-07-23T09:45:06.3299068+03:00</Time> 
     73      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\enemy ship 2.xnb</Output> 
     74      <Time>2015-07-22T13:01:57.3205187+03:00</Time> 
    7575    </Item> 
    7676    <Item> 
     
    8080      <Processor>TextureProcessor</Processor> 
    8181      <Options>None</Options> 
    82       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb</Output> 
    83       <Time>2015-07-23T09:46:46.4079068+03:00</Time> 
     82      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\cloud.xnb</Output> 
     83      <Time>2015-07-23T09:57:07.8638619+03:00</Time> 
    8484    </Item> 
    8585    <Item> 
     
    8989      <Processor>TextureProcessor</Processor> 
    9090      <Options>None</Options> 
    91       <Output>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb</Output> 
    92       <Time>2015-07-23T09:46:46.4089068+03:00</Time> 
     91      <Output>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\laser.xnb</Output> 
     92      <Time>2015-07-23T09:57:07.8638619+03:00</Time> 
    9393    </Item> 
    9494    <BuildSuccessful>true</BuildSuccessful> 
     
    9898      <BuildConfiguration>Debug</BuildConfiguration> 
    9999      <CompressContent>false</CompressContent> 
    100       <RootDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventureContent\</RootDirectory> 
    101       <LoggerRootDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\</LoggerRootDirectory> 
    102       <IntermediateDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\</IntermediateDirectory> 
    103       <OutputDirectory>C:\MyTemp\hyva\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\</OutputDirectory> 
     100      <RootDirectory>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventureContent\</RootDirectory> 
     101      <LoggerRootDirectory>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\</LoggerRootDirectory> 
     102      <IntermediateDirectory>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventureContent\obj\x86\Debug\</IntermediateDirectory> 
     103      <OutputDirectory>C:\MyTemp\EliasHy\SpaceAdventure\SpaceAdventure\SpaceAdventure\bin\x86\Debug\Content\</OutputDirectory> 
    104104    </Settings> 
    105105    <Assemblies> 
     
    138138      <Assembly> 
    139139        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    140         <Value>2015-07-09T14:19:15.2277481+03:00</Value> 
     140        <Value>2015-07-09T14:51:24.2760228+03:00</Value> 
    141141      </Assembly> 
    142142    </Assemblies> 
Note: See TracChangeset for help on using the changeset viewer.