Changeset 2321 for 2011/26


Ignore:
Timestamp:
2011-06-29 14:58:51 (12 years ago)
Author:
saselamp
Message:

Talletus.

Location:
2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/Peli.cs

    r2293 r2321  
    1414    const int RUUDUN_KOKO = 40; 
    1515 
    16     PlatformCharacter pelaaja1; 
     16     PlatformCharacter pelaaja1; 
     17     
     18 
    1719    GameObject heppu; 
    18     Image paikallaanvasemmalle = LoadImage("heppuleft"); 
    19     Image paikallaanoikelle = LoadImage("heppuright"); 
    20  
    21     Image[] kavelyvasemmalle = LoadImages("heppuright1, heppuright2"); 
    22     
     20    Image paikallaanvasemmalle = LoadImage("hahmoleft"); 
     21    Image paikallaanoikelle; 
     22     
     23    Image[] kavelyvasemmalle = LoadImages("hahmoright1","hahmoright2"); 
     24    Image[] kavelyoikelle; 
    2325    Image pelaajanKuva = LoadImage("hahmo"); 
    2426 
     
    3436    Image heppukuva = LoadImage("heppu"); 
    3537    Image ruohokuva = LoadImage("ruoho"); 
     38    Image koivukuva = LoadImage("koivu"); 
    3639 
    3740 
     
    4144    public override void Begin() 
    4245    { 
     46         
     47        paikallaanoikelle = Image.Mirror(paikallaanvasemmalle); 
     48        kavelyoikelle = Image.Mirror(kavelyvasemmalle); 
     49         
     50       
     51         
     52        
     53         
     54 
     55 
     56 
    4357        Gravity = new Vector(0, -1000); 
     58         
     59 
     60 
    4461 
    4562        luoKentta(); 
     
    6582        kentta['H'] = lisaaheppu; 
    6683        kentta['='] = lisaaruoho; 
    67  
    68  
    69  
    70  
    71         kentta.Insert(RUUDUN_KOKO, RUUDUN_KOKO); 
     84        kentta[')'] = lisaakoivu; 
     85        
     86 
     87 
     88 
     89 
     90        kentta.Insert(50, 50); 
    7291        Level.CreateBorders(); 
    7392        Level.Background.CreateGradient(Color.White, Color.SkyBlue);  
     93    } 
     94    PhysicsObject lisaakoivu() 
     95    { 
     96        PhysicsObject koivu = PhysicsObject.CreateStaticObject(50, 50); 
     97        koivu.Image = koivukuva; 
     98        koivu.Tag = "koivu"; 
     99 
     100        Add(koivu); 
     101        return koivu; 
    74102    } 
    75103    PhysicsObject lisaaruoho() 
     
    170198        pelaaja1.Image = pelaajanKuva; 
    171199        AddCollisionHandler(pelaaja1, osuTahteen); 
     200         
     201        pelaaja1.LeftIdleAnimation = new Animation(paikallaanvasemmalle); 
     202        pelaaja1.RightIdleAnimation = new Animation(paikallaanoikelle); 
     203 
     204        pelaaja1.LeftWalkingAnimation = new Animation(kavelyvasemmalle); 
     205        pelaaja1.RightWalkingAnimation = new Animation(kavelyoikelle); 
    172206        return pelaaja1; 
    173207    } 
  • 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/kentta1.txt

    r2293 r2321  
    77 
    88                                                                                                                                                                                                                                                                                                                                                                 
    9                                                                                                                                             (        ) 
    10                                                                                                                                             (        ) 
    11                                  /(                   ))                                                               (                    (        ) 
     9                                                                                                                                             
     10                                                                                                                                                   
     11                                                                                                                                                     ( 
     12                                                                                                                                                    % 
    1213                                  (                   ))                       (                                       (                    (  ==#####==== 
    1314                                  (                   ))                       (                 (                     (                  ==(==###########=== 
Note: See TracChangeset for help on using the changeset viewer.