Ignore:
Timestamp:
2014-07-02 09:51:28 (6 years ago)
Author:
mijoilmo
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Player.cs

    r5260 r5261  
    99public class Player : PhysicsObject 
    1010{ 
    11     public void rotate(double rotSpeed) 
    12  
    1311    GameObject thrusterEffect; 
    1412    public void rotate(double rotSpeed) 
    15  
    16  
    1713    { 
    18  
    1914        this.AngularVelocity = rotSpeed; 
    2015    } 
    21     public void throttle() 
    2216    public void thrusterStart(double speed) 
    2317    { 
    24         this.Push(Vector.FromLengthAndAngle(100, this.Angle + Angle.RightAngle)); 
    2518        this.thrusterEffect.IsVisible = true; 
    2619        this.Push(Vector.FromLengthAndAngle(speed*800, this.Angle + Angle.RightAngle)); 
    2720    } 
    28     public Player() 
    2921    public void thrusterEnd() 
    3022    { 
     
    3325    } 
    3426    public Player() 
     27        : base(40, 40) 
     28    { 
     29        this.Image = Proto236b.images["player"]; 
     30        bool IDS = true; //inertial dampening system, katsotaan pistetäänkö ostettavaksi peliin 
     31        if (IDS == true) 
     32        { 
     33            this.LinearDamping = 0.97; 
     34        } 
     35        else 
     36        { 
     37            this.LinearDamping = 1; 
     38        } 
     39        this.AngularDamping = 0.7; 
     40 
     41        this.thrusterEffect = new GameObject(40,40); 
     42        thrusterEffect.Image = Proto236b.images["player_thruster"]; 
     43        thrusterEffect.IsVisible = false; 
     44        thrusterEffect.Y -= 20; 
     45        Add(thrusterEffect); 
     46    } 
     47} 
Note: See TracChangeset for help on using the changeset viewer.