Changeset 9119 for 2017/30/HugoE
- Timestamp:
- 2017-07-26 12:43:10 (5 years ago)
- Location:
- 2017/30/HugoE/HanniAndHoo/HanniAndHoo
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.cs
r9118 r9119 14 14 AssaultRifle HanninAse; 15 15 16 AssaultRifleHoonAse;16 Cannon HoonAse; 17 17 18 18 … … 28 28 29 29 AmmuAseella(HanninAse); 30 AmmuAseella2(HoonAse); 30 31 31 32 … … 40 41 41 42 Hanni = new PlatformCharacter(80.0, 80.0); 42 Hanni.X = Level.Left + 20.0;43 Hanni.X = Level.Left + 100.0; 43 44 Hanni.Y = 0.0; 44 45 Hanni.Shape = Shape.Circle; … … 54 55 55 56 Hoo = new PlatformCharacter (100.0, 100.0); 56 Hoo.X = Level.Right - 20.0;57 Hoo.X = Level.Right - 100.0; 57 58 Hoo.Y = 0.0; 58 59 Hoo.Shape = Shape.Circle; … … 61 62 Hoo.CanRotate = false; 62 63 Add(Hoo); 63 HoonAse = new AssaultRifle(90, 30);64 HoonAse = new Cannon (90, 30); 64 65 HoonAse.ProjectileCollision = AmmusOsui; 65 HoonAse.X += 50; 66 HoonAse.Y -= 10; 66 HoonAse.X += 80; 67 67 Hoo.Add(HoonAse); 68 HoonAse.Power.DefaultValue = 20000; 68 69 } 69 70 70 71 void AmmusOsui(PhysicsObject Ammus, PhysicsObject Kohde) 71 72 { 72 //Ammus.Destroy, Kohde;73 Ammus.Destroy(); 73 74 74 75 } … … 95 96 void LuoKentta() 96 97 { 97 Gravity = new Vector(0.0, -800.0); 98 99 98 Gravity = new Vector(0.0, -800.0); 100 99 PhysicsObject AlaReuna = Level.CreateBottomBorder(0.0, false); 101 100 PhysicsObject OikeaReuna = Level.CreateRightBorder(0.0, false); 102 101 PhysicsObject VasenReuna = Level.CreateLeftBorder(0.0, false); 102 PhysicsObject YläReuna = Level.CreateTopBorder(0.0, false); 103 103 104 105 106 104 107 108 105 } 109 106 … … 124 121 { 125 122 PhysicsObject Ammus = HanninAse.Shoot(); 126 Keyboard.Listen(Key.Space, ButtonState.Pressed, AmmuAseella, "Ammu", HanninAse); 123 Keyboard.Listen(Key.S, ButtonState.Pressed, AmmuAseella, "Ammu", HanninAse); 124 HanninAse.FireRate = 0.25; 127 125 128 126 if (Ammus != null) … … 133 131 } 134 132 133 } 134 135 void AmmuAseella2(Cannon HoonAse) 136 { 137 PhysicsObject Ammus = HoonAse.Shoot(); 138 Keyboard.Listen(Key.Down, ButtonState.Pressed, AmmuAseella2, "Ammu2", HoonAse); 139 HoonAse.FireRate = 0.25; 140 141 142 if (Ammus != null) 143 { 144 Ammus.Size *= 4; 145 Ammus.MaximumLifetime = TimeSpan.FromSeconds(4.0); 146 147 } 148 149 135 150 136 151 } … … 138 153 139 154 140 141 142 143 144 145 146 147 148 149 155 }
Note: See TracChangeset
for help on using the changeset viewer.