Changeset 7915


Ignore:
Timestamp:
2016-07-06 20:58:30 (3 years ago)
Author:
juleppaa
Message:
 
Location:
2016/24/JustusL/Object_Ball
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/Object_Ball.cs

    r7851 r7915  
    1919 
    2020    bool liikkes; 
    21  
     21    //int kenttaNro = 1; 
     22    IntMeter pisteLaskuri; 
    2223    Label hiiri; 
    2324    PhysicsObject pallo; 
     
    7677        Add(tausta, -3); 
    7778        Level.CreateBorders(); 
    78          
     79 
     80        pisteLaskuri = new IntMeter(0); 
     81 
     82        Label pisteNaytto = new Label(); 
     83        pisteNaytto.IntFormatString = " {0:D1} Stars collected "; 
     84        pisteNaytto.TextColor = Color.HotPink; 
     85        pisteNaytto.X = Screen.Right  -100; 
     86        pisteNaytto.Y = Screen.Top - 108; 
     87        pisteNaytto.TextColor = Color.Black; 
     88        pisteNaytto.Color = Color.White; 
     89        pisteNaytto.BindTo(pisteLaskuri); 
     90        Add(pisteNaytto); 
     91 
     92        
    7993    } 
    8094 
     
    110124            { 
    111125                if (haamu != null) haamu.Destroy(); 
    112                 haamu = new GameObject(100, 100); 
     126                haamu = new GameObject(20, 20); 
    113127                haamu.Color = new Color(0, 0, 0, 128); 
    114128                Add(haamu); 
     
    134148        Keyboard.Listen(Key.Escape, ButtonState.Pressed, PauseValikko, "Pause"); 
    135149        Keyboard.Listen(Key.Enter, ButtonState.Pressed, PalloLiikkeelle, "Start"); 
    136         Keyboard.Listen(Key.Delete,ButtonState.Down, delegate { 
    137              
    138             Keyboard.Listen(Key.Right, ButtonState.Down, MuutaSkaalaa, null, new Vector(1.5, 0)); 
    139             Keyboard.Listen(Key.Left, ButtonState.Down, MuutaSkaalaa, null, new Vector(-1.5, 0)); 
    140             Keyboard.Listen(Key.Up, ButtonState.Down, MuutaSkaalaa, null, new Vector(0, 1.5)); 
    141             Keyboard.Listen(Key.Down, ButtonState.Down, MuutaSkaalaa, null, new Vector(0, -1.5)); 
    142              
    143         }, null ); 
    144  
    145150        Keyboard.Listen(Key.NumPad1, ButtonState.Down, MuutaKulmaa, null, 1); 
    146151        Keyboard.Listen(Key.NumPad3, ButtonState.Down, MuutaKulmaa, null, -1); 
     152        Keyboard.Listen(Key.A, ButtonState.Down, MuutaKulmaa, null, 1); 
     153        Keyboard.Listen(Key.Z, ButtonState.Down, MuutaKulmaa, null, -1); 
    147154        Keyboard.Listen(Key.Right, ButtonState.Down, MuutaSkaalaa, null, new Vector(1,0)); 
    148155        Keyboard.Listen(Key.Left, ButtonState.Down, MuutaSkaalaa, null, new Vector(-1, 0)); 
     
    251258        tahti.Tag = "tahti"; 
    252259        tahti.Position = paikka; 
    253  
     260        tahti.IgnoresCollisionResponse = true; 
    254261        Add(tahti); 
    255262    } 
     
    259266        tahti.Destroy(); 
    260267        MessageDisplay.Add("Moi!"); 
    261        IntMeter pisteLaskuri = new IntMeter(0); 
    262  
    263         Label pisteNaytto = new Label(); 
    264         pisteNaytto.X = Screen.Left + 100; 
    265         pisteNaytto.Y = Screen.Top - 100; 
    266         pisteNaytto.TextColor = Color.Black; 
    267         pisteNaytto.Color = Color.White; 
    268         pisteNaytto.BindTo(pisteLaskuri); 
    269         Add(pisteNaytto); 
    270  
     268        
    271269        pisteLaskuri.Value++; 
    272270    } 
     
    317315    void TarkistaNopeus() 
    318316    { 
    319         if (pallo.Velocity.Magnitude < 0.04) 
     317        if (pallo.Velocity.Magnitude < 0.03) 
    320318        { 
    321319 
     
    355353    void Zoomaa() 
    356354    { 
    357         Camera.ZoomFactor += Mouse.WheelChange * 0.05; 
     355        Camera.ZoomFactor += Mouse.WheelChange * 0.07; 
    358356    } 
    359357    void PauseValikko() 
     
    405403        havio.SetButtonColor(Color.DarkRed); 
    406404        havio.QuestionLabel.TextColor = Color.Red; 
    407  
    408405        havio.AddItemHandler(0, Uudestaan); 
     406 
    409407        havio.AddItemHandler(2, ConfirmExit); 
    410408    } 
     
    417415        Add(voittoValikko); 
    418416        voittoValikko.AddItemHandler(0, Uudestaan); 
    419         voittoValikko.AddItemHandler(2, ConfirmExit); 
     417        voittoValikko.AddItemHandler(1, Uudestaan); 
     418 
     419        voittoValikko.AddItemHandler(3, ConfirmExit); 
    420420        /*MessageDisplay.Add("You are good!"); 
    421421        Timer.SingleShot(3, Exit);*/ 
     
    427427        ClearAll(); 
    428428        tyokalu = -1; 
     429        /*if (kenttaNro > 2) ; //Tähän kolmosen kohdalle tulee kenttien lukumäärä 
     430        else Begin("kentta" + kenttaNro);*/ 
    429431        Begin(); 
    430432    } 
  • 2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/obj/x86/Debug/ContentPipeline-{CD347656-A8F2-48EE-8097-A4F9AF1242F0}.xml

    r7851 r7915  
    88      <Processor>TextureProcessor</Processor> 
    99      <Options>None</Options> 
    10       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output> 
    11       <Time>2016-07-05T10:37:41.3098919+03:00</Time> 
     10      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output> 
     11      <Time>2016-07-06T20:54:07.2722362+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1717      <Processor>TextureProcessor</Processor> 
    1818      <Options>None</Options> 
    19       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output> 
    20       <Time>2016-07-04T10:29:37.230784+03:00</Time> 
     19      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output> 
     20      <Time>2016-06-16T12:22:54.0854567+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2626      <Processor>TextureProcessor</Processor> 
    2727      <Options>None</Options> 
    28       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output> 
    29       <Time>2016-07-04T10:29:37.090384+03:00</Time> 
     28      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output> 
     29      <Time>2016-06-16T12:22:55.824712+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3535      <Processor>TextureProcessor</Processor> 
    3636      <Options>None</Options> 
    37       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output> 
    38       <Time>2016-07-04T10:29:37.090384+03:00</Time> 
     37      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output> 
     38      <Time>2016-06-16T11:35:20.5217772+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4444      <Processor>TextureProcessor</Processor> 
    4545      <Options>None</Options> 
    46       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output> 
    47       <Time>2016-07-04T10:29:37.230784+03:00</Time> 
     46      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output> 
     47      <Time>2016-06-16T11:35:20.5287781+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    5353      <Processor>TextureProcessor</Processor> 
    5454      <Options>None</Options> 
    55       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output> 
    56       <Time>2016-07-04T10:29:37.090384+03:00</Time> 
     55      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output> 
     56      <Time>2016-06-16T12:22:56.4812302+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    6262      <Processor>TextureProcessor</Processor> 
    6363      <Options>None</Options> 
    64       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output> 
    65       <Time>2016-07-04T13:04:34.8082709+03:00</Time> 
     64      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output> 
     65      <Time>2016-07-04T20:43:40.1219171+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7171      <Processor>TextureProcessor</Processor> 
    7272      <Options>None</Options> 
    73       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta1.xnb</Output> 
    74       <Time>2016-07-06T10:37:01.9231134+03:00</Time> 
     73      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta1.xnb</Output> 
     74      <Time>2016-07-06T15:26:04.3249763+03:00</Time> 
    7575    </Item> 
    7676    <Item> 
     
    8080      <Processor>TextureProcessor</Processor> 
    8181      <Options>None</Options> 
    82       <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta2.xnb</Output> 
    83       <Time>2016-07-04T14:53:50.6394709+03:00</Time> 
     82      <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta2.xnb</Output> 
     83      <Time>2016-07-04T20:43:40.2029413+03:00</Time> 
    8484    </Item> 
    8585    <BuildSuccessful>true</BuildSuccessful> 
     
    9090      <BuildConfiguration>Debug</BuildConfiguration> 
    9191      <CompressContent>false</CompressContent> 
    92       <RootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory> 
    93       <LoggerRootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory> 
    94       <IntermediateDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory> 
    95       <OutputDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory> 
     92      <RootDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory> 
     93      <LoggerRootDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory> 
     94      <IntermediateDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory> 
     95      <OutputDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory> 
    9696    </Settings> 
    9797    <Assemblies> 
    9898      <Assembly> 
    99         <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
    100         <Value>2015-02-09T20:18:44+02:00</Value> 
     99        <Key>C:\Users\Justus\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     100        <Value>2015-04-01T18:41:16+03:00</Value> 
    101101      </Assembly> 
    102102      <Assembly> 
     
    125125      </Assembly> 
    126126      <Assembly> 
    127         <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
    128         <Value>2015-02-17T22:27:18+02:00</Value> 
     127        <Key>C:\Users\Justus\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     128        <Value>2015-04-01T18:41:16+03:00</Value> 
    129129      </Assembly> 
    130130      <Assembly> 
    131         <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> 
    132         <Value>2015-09-16T19:42:13.6500946+03:00</Value> 
     131        <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> 
     132        <Value>2015-12-15T06:54:21.9346879+02:00</Value> 
    133133      </Assembly> 
    134134    </Assemblies> 
Note: See TracChangeset for help on using the changeset viewer.