Changeset 3770 for 2012/30


Ignore:
Timestamp:
2012-07-26 14:59:03 (7 years ago)
Author:
otelretu
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2012/30/OtsoR/Projekti/Projekti/Projekti/Projekti.cs

    r3764 r3770  
    1010{ 
    1111    Image[] shipimages = new Image[100]; 
    12          
    13         //LoadImages("s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", 
    14         //"s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", "s32", 
    15         //"s33", "s34", "s35", "s36", "s37", "s38", "s39", "s40", "s41", "s42"); 
    16     Color[] shipcolors = { Color.DarkGray, Color.Silver, Color.DarkOrange, Color.Green }; 
    17     Color[] shipcolors2 = { Color.Ruby, Color.Azure, Color.Emerald, Color.Green }; 
     12    Color[] shipcolors = { Color.DarkGray, Color.Silver, Color.DarkOrange, Color.Ultramarine }; 
     13    Color[] shipcolors2 = { Color.Ruby, Color.Azure, Color.Emerald, Color.Emerald }; 
     14 
     15    String[] weaponnames = { "projectile","laser","plasma" }; 
    1816     
    1917    PhysicsObject ship; 
     
    2422 
    2523    Label number; 
     24    Label weaponlabel; 
    2625    Widget Aluskuva; 
    2726    IntMeter shipimg; 
     
    7069        shipimg.Changed += Changeship; 
    7170        shipwpn = new IntMeter(1, 1, 3); 
    72         //shipwpn.Changed += ???; 
     71        shipwpn.Changed += delegate { weaponlabel.Text = weaponnames[shipwpn.Value - 1]; }; 
    7372        shipcolor = new IntMeter(1, 1, 4); 
    7473        shipcolor.Changed += Changeship; 
     
    8079        Add(number); 
    8180 
     81        weaponlabel = new Label(weaponnames[0]); 
     82        weaponlabel.X = 125; 
     83        weaponlabel.Y = 125; 
     84        Add(weaponlabel); 
     85 
    8286        Slider shiptype = new Slider(550, 10); 
    8387        shiptype.X = 0; 
    8488        shiptype.Y = 200; 
    8589        shiptype.BindTo(shipimg); 
    86         Slider shipcolour = new Slider(150, 15); 
     90        Slider shipcolour = new Slider(125, 15); 
    8791        shipcolour.X = -125; 
    8892        shipcolour.Y = 150; 
    8993        shipcolour.BindTo(shipcolor); 
    90         Slider shipweapon = new Slider(150, 15); 
     94        Slider shipweapon = new Slider(125, 15); 
    9195        shipweapon.X = 125; 
    9296        shipweapon.Y = 150; 
     
    96100        Add(shipcolour); 
    97101        Add(shipweapon); 
    98         choice(shipwpn.Value); 
    99102 
    100103        List<Label> valikonKohdat; 
     
    126129        ship.AngularDamping = 0.95; 
    127130        Add(ship); 
     131        choice(shipwpn.Value); 
    128132        ship.Add(weapon); 
    129133    } 
Note: See TracChangeset for help on using the changeset viewer.