Changeset 5299 for 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Player.cs
- Timestamp:
- 2014-07-02 14:59:44 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Player.cs
r5286 r5299 10 10 { 11 11 GameObject thrusterEffect; 12 Game parent; 12 Proto236b parent; 13 13 14 public void rotate(double rotSpeed) 14 15 { … … 25 26 //if this.ids, enable ids 26 27 } 27 public Player( Gameparent)28 public Player(Proto236b parent) 28 29 : base(40, 40) 29 30 { 30 this.Image = Proto236b.images["player"];31 this.Shape = Shape.FromImage(Proto236b.images["player"]);32 31 this.parent = parent; 32 this.Image = parent.Images["player"]; 33 this.Shape = Shape.FromImage(parent.Images["player"]); 33 34 bool IDS = false; //inertial dampening system, katsotaan pistetäänkö ostettavaksi peliin 34 35 if (IDS == true) … … 43 44 44 45 this.thrusterEffect = new GameObject(40, 40); 45 thrusterEffect.Image = Proto236b.images["player_thruster"];46 thrusterEffect.Image = parent.Images["player_thruster"]; 46 47 thrusterEffect.IsVisible = false; 47 48 thrusterEffect.Y -= 20; … … 50 51 public override void Update(Time time) 51 52 { 52 Game parent = this.parent; 53 if (this.X + parent.Level.Width / 2.0 > parent.Level.Right) 54 { 55 if (this.X > parent.Level.Right) 56 { 57 //parent.Camera 58 this.X = parent.Level.Left; 59 } 53 base.Update(time); 54 if (this.X > parent.Level.Right) { 55 this.X = parent.Level.Left; 56 }else if (this.X < parent.Level.Left){ 57 this.X = parent.Level.Right; 60 58 } 61 base.Update(time);62 59 } 63 60 }
Note: See TracChangeset
for help on using the changeset viewer.