Changeset 8769 for 2017/24


Ignore:
Timestamp:
2017-06-16 10:39:43 (6 years ago)
Author:
npo17_10
Message:
 
Location:
2017/24/IlariI/piXgel GAmE/piXgel GAmE/piXgel_GAmE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/IlariI/piXgel GAmE/piXgel GAmE/piXgel_GAmE/piXgel_GAmE.cs

    r8766 r8769  
    1717    Image vihollinenkuva = LoadImage("vihollinen"); 
    1818 
    19   //Image[] hahmonKavely = LoadImages("hahmo", "hahmo2"); 
    20   //Image[] hahmo2Kavely = LoadImages("hahmovasemmalle", "hahmovasemmalle2"); 
    21   //Image[] hahmo3kavely = LoadImages("hahmooikealle", "hahmooikealle2"); 
    22   //Image[] hahmo4kavely = LoadImages("hahmotakaa", "hahmotakaa2"); 
     19    Image[] hahmonKavely = LoadImages("hahmo", "hahmo2"); 
     20    Image[] hahmo2Kavely = LoadImages("hahmovasemmalle", "hahmovasemmalle2"); 
     21    Image[] hahmo3kavely = LoadImages("hahmooikealle", "hahmooikealle2"); 
     22    Image[] hahmo4kavely = LoadImages("hahmotakaa", "hahmotakaa2"); 
     23 
     24    //Image[] hahmonKavely = LoadImages("hahmo", "hahmo2"); 
     25    //Image[] hahmo2Kavely = LoadImages("hahmovasemmalle", "hahmovasemmalle2"); 
     26    //Image[] hahmo3kavely = LoadImages("hahmooikealle", "hahmooikealle2"); 
     27    //Image[] hahmo4kavely = LoadImages("hahmotakaa", "hahmotakaa2"); 
    2328 
    2429 
     
    7681        vihollispawner.Start(); 
    7782 
    78         Timer animoija = new Timer(); 
    79         animoija.Interval = 0.5; 
    80         animoija.Timeout += Liikkuja; 
    81         animoija.Start(); 
     83       //Timer animoija = new Timer(); 
     84       //animoija.Interval = 0.5; 
     85       //animoija.Timeout += Liikkuja; 
     86       //animoija.Start(); 
    8287 
    8388 
     
    121126    void Liikkuja() 
    122127    { 
    123         Image[] hahmonKavely = LoadImages("hahmo", "hahmo2"); 
    124         Image[] hahmo2Kavely = LoadImages("hahmovasemmalle", "hahmovasemmalle2"); 
    125         Image[] hahmo3kavely = LoadImages("hahmooikealle", "hahmooikealle2"); 
    126         Image[] hahmo4kavely = LoadImages("hahmotakaa", "hahmotakaa2"); 
     128        
    127129    } 
    128130 
     
    262264        { 
    263265            hahmonase.Angle = Angle.FromDegrees(180.0); 
    264             hahmo.Image = hahmonkuvavasemmalle; //hahmo.Animation = new Animation(hahmo2Kavely); 
     266            hahmo.Image = hahmonkuvavasemmalle; hahmo.Animation = new Animation(hahmo2Kavely); 
    265267        } 
    266268        if (suunta.X > 0) 
    267269        { 
    268270            hahmonase.Angle = Angle.FromDegrees(0.0); 
    269             hahmo.Image = hahmonkuvaoikealle; 
     271            hahmo.Image = hahmonkuvaoikealle; hahmo.Animation = new Animation(hahmo3kavely); 
     272 
    270273        } 
    271274        if (suunta.Y > 0) 
    272275        { 
    273276            hahmonase.Angle = Angle.FromDegrees(90.0); 
    274             hahmo.Image = hahmonkuvatakaa; 
     277            hahmo.Image = hahmonkuvatakaa; hahmo.Animation = new Animation(hahmo4kavely); 
    275278 
    276279        } 
     
    278281        { 
    279282            hahmonase.Angle = Angle.FromDegrees(270.0); 
    280             hahmo.Image = hahmonkuva; 
     283            hahmo.Image = hahmonkuva; hahmo.Animation = new Animation(hahmonKavely); 
    281284        } 
    282285 
Note: See TracChangeset for help on using the changeset viewer.