Changeset 3058
- Timestamp:
- 2012-06-15 10:25:27 (11 years ago)
- Location:
- 2012/24/AnttoniS/Ufot
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/24/AnttoniS/Ufot/Ufot/Ufot/Ufot.cs
r3022 r3058 13 13 Image tahtainKuva = LoadImage("tahtain"); 14 14 DoubleMeter voimaMittari; 15 DoubleMeter voimaMittari2; 15 16 PhysicsObject pää; 16 17 Image ukko = LoadImage("ukko"); … … 21 22 Cannon tykki; 22 23 GameObject tahtain; 23 24 Timer vihuAmpuuAjastin; 24 25 25 26 public override void Begin() 26 27 { 27 voimaMittari = new DoubleMeter(1 0);28 voimaMittari.MaxValue = 1 0;28 voimaMittari = new DoubleMeter(15); 29 voimaMittari.MaxValue = 15; 29 30 voimaMittari.LowerLimit += delegate { tuhoaPelaaja(); }; 30 31 ProgressBar voimaPalkki = new ProgressBar(200, 10); … … 71 72 vartalo.Move(new Vector(1000, 0)); 72 73 74 75 voimaMittari2 = new DoubleMeter(45); 76 voimaMittari2.MaxValue = 45; 77 voimaMittari2.LowerLimit += delegate { tuhoaUfo(); }; 78 voimaMittari.LowerLimit += delegate { tuhoaPelaaja(); }; 79 80 ProgressBar voimaPalkki2 = new ProgressBar(200, 10); 81 voimaPalkki2.BindTo(voimaMittari2); 82 Add(voimaPalkki2); 83 voimaPalkki2.X = Screen.Left + 150; 84 voimaPalkki2.Y = Screen.Top - 100; 85 voimaPalkki2.BarColor = Color.Red; 86 voimaPalkki2.BorderColor = Color.Yellow; 87 voimaPalkki2.Angle = Angle.RightAngle; 88 voimaPalkki2.Angle = Angle.FromDegrees(0); 73 89 olio = new PhysicsObject(300, 120); 74 90 olio.Color = Color.Gray; … … 99 115 100 116 101 TimervihuAmpuuAjastin = new Timer();102 vihuAmpuuAjastin.Interval = 2.0;117 vihuAmpuuAjastin = new Timer(); 118 vihuAmpuuAjastin.Interval = 1.5; 103 119 vihuAmpuuAjastin.Timeout += new Action(vihuAmpuu); 104 120 vihuAmpuuAjastin.Start(); … … 127 143 kuula.Tag = "kuula"; 128 144 kuula.Hit((vartalo.Position - olio.Position) * 40); 129 kuula.Size *= 2;145 kuula.Size *= 3; 130 146 AddCollisionHandler(kuula, KuulaTormaa); 131 147 … … 155 171 ammus.Shape = Shape.Circle; 156 172 AddCollisionHandler(ammus, AmmusTormaa); 173 AddCollisionHandler(ammus, olio, luoti); 157 174 } 158 175 } … … 232 249 tormaaja.Destroy(); 233 250 } 251 252 253 void VahennaElamaa2(PhysicsObject olio, PhysicsObject vartalo) 254 { 255 voimaMittari2.Value--; 256 } 257 258 void tuhoaUfo() 259 { 260 olio.Destroy(); 261 tykki.Destroy(); 262 vihuAmpuuAjastin.Stop(); 263 264 } 265 266 void luoti(PhysicsObject tormaaja, PhysicsObject kohde) 267 { 268 if (kohde == olio) 269 voimaMittari2.Value--; 270 tormaaja.Destroy(); 271 } 234 272 } -
2012/24/AnttoniS/Ufot/Ufot/Ufot/obj/x86/Debug/ContentPipeline-{79138FA0-960A-4FD2-BC0E-B4BD422F72DE}.xml
r3022 r3058 45 45 <Options>None</Options> 46 46 <Output>C:\MyTemp\AnttoniS\Ufot\Ufot\Ufot\bin\x86\Debug\Content\background.xnb</Output> 47 <Time>2012-06-14T1 0:33:21.0020311+03:00</Time>47 <Time>2012-06-14T14:58:33.2691919+03:00</Time> 48 48 </Item> 49 49 <Item>
Note: See TracChangeset
for help on using the changeset viewer.