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

Legend:

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

    r5256 r5260  
    99public class Player : PhysicsObject 
    1010{ 
     11    public void rotate(double rotSpeed) 
     12 
    1113    GameObject thrusterEffect; 
    1214    public void rotate(double rotSpeed) 
     15 
     16 
    1317    { 
     18 
    1419        this.AngularVelocity = rotSpeed; 
    1520    } 
     21    public void throttle() 
    1622    public void thrusterStart(double speed) 
    1723    { 
     24        this.Push(Vector.FromLengthAndAngle(100, this.Angle + Angle.RightAngle)); 
    1825        this.thrusterEffect.IsVisible = true; 
    1926        this.Push(Vector.FromLengthAndAngle(speed*800, this.Angle + Angle.RightAngle)); 
    2027    } 
     28    public Player() 
    2129    public void thrusterEnd() 
    2230    { 
     
    2533    } 
    2634    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.