Ignore:
Timestamp:
2016-06-07 15:46:05 (3 years ago)
Author:
jotapoti
Message:

pelaajan liikkumista säädetty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/23/ohjaajat/Punasininen/Punasininen/Punasininen/Punasininen.cs

    r7188 r7189  
    4848        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    4949        taso.Position = paikka; 
    50         taso.Color = Color.Green; 
     50        taso.Color = Color.Black; 
     51        AddCollisionHandler(taso, "player", Varjaa); 
    5152        Add(taso); 
    5253    } 
     
    5960        return player; 
    6061 
     62    } 
     63 
     64    void Varjaa(PhysicsObject platform, PhysicsObject player) 
     65    { 
     66        platform.Color = player.Color;  
    6167    } 
    6268 
     
    7985    void Move(AnalogState stick, Player player) 
    8086    { 
     87        /*Vector state = stick.StateVector; 
     88        player.Walk(state.X * 500);*/ 
     89         
    8190        if (stick.StateVector.Magnitude > 0.15) 
    8291            player.Walk(stick.StateVector.X > 0 ? Direction.Right : Direction.Left); 
Note: See TracChangeset for help on using the changeset viewer.