- Timestamp:
- 2015-06-25 22:55:23 (8 years ago)
- Location:
- 2014/30/MitjaK/Attack to Agora/Attack to Agora
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora.sln
r6334 r6406 13 13 DebugVisualize|x86 = DebugVisualize|x86 14 14 Release|x86 = Release|x86 15 Visualize|x86 = Visualize|x86 15 16 EndGlobalSection 16 17 GlobalSection(ProjectConfigurationPlatforms) = postSolution … … 21 22 {DDF55303-D454-45BC-81E0-ED7879E29D5C}.Release|x86.ActiveCfg = Release|x86 22 23 {DDF55303-D454-45BC-81E0-ED7879E29D5C}.Release|x86.Build.0 = Release|x86 24 {DDF55303-D454-45BC-81E0-ED7879E29D5C}.Visualize|x86.ActiveCfg = Visualize|x86 25 {DDF55303-D454-45BC-81E0-ED7879E29D5C}.Visualize|x86.Build.0 = Visualize|x86 23 26 {2930AD0E-5824-4386-8008-3C0C45D1DA86}.Debug|x86.ActiveCfg = Debug|x86 24 27 {2930AD0E-5824-4386-8008-3C0C45D1DA86}.DebugVisualize|x86.ActiveCfg = Debug|x86 25 28 {2930AD0E-5824-4386-8008-3C0C45D1DA86}.Release|x86.ActiveCfg = Release|x86 29 {2930AD0E-5824-4386-8008-3C0C45D1DA86}.Visualize|x86.ActiveCfg = Release|x86 26 30 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Debug|x86.ActiveCfg = Debug|x86 27 31 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Debug|x86.Build.0 = Debug|x86 … … 30 34 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Release|x86.ActiveCfg = Release|x86 31 35 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Release|x86.Build.0 = Release|x86 36 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Visualize|x86.ActiveCfg = Visualize|x86 37 {74DD1DDD-283D-45D7-A79D-3DCB120708A6}.Visualize|x86.Build.0 = Visualize|x86 32 38 EndGlobalSection 33 39 GlobalSection(SolutionProperties) = preSolution -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora.csproj
r6334 r6406 60 60 <PlatformTarget>x86</PlatformTarget> 61 61 <XnaCompressContent>true</XnaCompressContent> 62 </PropertyGroup> 63 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Visualize|x86'"> 64 <DebugSymbols>true</DebugSymbols> 65 <OutputPath>bin\x86\Visualize\</OutputPath> 66 <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants> 67 <NoStdLib>true</NoStdLib> 68 <DebugType>full</DebugType> 69 <PlatformTarget>x86</PlatformTarget> 70 <CodeAnalysisLogFile>bin\x86\Debug\Attack to Agora.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile> 71 <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> 72 <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> 73 <UseVSHostingProcess>false</UseVSHostingProcess> 74 <ErrorReport>prompt</ErrorReport> 75 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 76 <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> 77 <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> 62 78 </PropertyGroup> 63 79 <ItemGroup> -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora.cs
r6402 r6406 39 39 40 40 const double VIHOLLISEN_TORMAYSDMG = 4.0; 41 int kenttaNro = 1;41 int kenttaNro = 9; 42 42 43 43 /// <summary> … … 55 55 public override void Begin() 56 56 { 57 Window.Width = 1024;58 Window.Height = 768;59 57 FixCamera(); 60 58 … … 257 255 258 256 259 void Liikuta(P latformCharacterpelaaja, double suunta)260 { 261 pelaaja. Walk(suunta);257 void Liikuta(PhysicsObject pelaaja, double suunta) 258 { 259 pelaaja.Velocity = new Vector(suunta, pelaaja.Velocity.Y); 262 260 263 261 if (!pelaaja.Animation.IsPlaying) … … 265 263 } 266 264 267 void LiikutaYlos(PlatformCharacter pelaaja) 268 { 269 pelaaja.Jump(HYPPYVOIMA); 265 void LiikutaYlos(PhysicsObject pelaaja) 266 { 270 267 // pelaaja.Tag = "hyppy"; // PYRY MITÄ...rip 268 269 pelaaja.Hit(new Vector(0, HYPPYVOIMA * pelaaja.Mass)); 270 271 271 Sound pelaajaHyppyAani = hyppy.CreateSound(); 272 272 pelaajaHyppyAani.Pitch = 0.1; … … 464 464 { 465 465 case 10: 466 TriggerAction += delegate { LuoJouniBoss(new Vector(Screen.Left - jouniBoss.Width / 2 - 20, 0.0), new Vector(Screen.Left + jouniBoss.Width * 1.3, 0.0)); }; 466 FixCamera(); 467 TriggerAction += delegate { LuoJouniBoss(new Vector(Screen.Left - jouniBoss.Width / 2 - 20, Screen.Bottom + (jouniBoss.Height / 2) - 100), Screen.Left + jouniBoss.Width / 2); }; 467 468 break; 468 469 case 18: … … 482 483 } 483 484 484 void LuoChromaCase( )485 void LuoChromaCase(ItemType forceItem) 485 486 { 486 487 Mouse.IsCursorVisible = true; … … 513 514 GameObject cCaseFront = new GameObject(cCaseF); 514 515 515 ChromaCase cCase = new ChromaCase(pItems, cCaseFront, null, 20); 516 cCase.Add(new Vector(0.0, Level.Bottom + cCaseFront.Height / 2), 2); 517 cCase.ItemReceived += delegate(GameObject o) { GotItemFromCase(o); }; 518 cCase.ItemRelativePosition = new Vector((472 - 467.5), (455 - 204)); 519 cCase.Start(); 520 516 if (forceItem == ItemType.Knife) 517 { 518 ChromaCase cCase = new ChromaCase(pItems, cCaseFront, knife, 20); 519 cCase.Add(new Vector(0.0, Level.Bottom + cCaseFront.Height / 2), 2); 520 cCase.ItemReceived += delegate(GameObject o) { GotItemFromCase(o); }; 521 cCase.ItemRelativePosition = new Vector((472 - 467.5), (455 - 204)); 522 cCase.Start(); 523 } 524 else 525 { 526 ChromaCase cCase = new ChromaCase(pItems, cCaseFront, avain, 20); 527 cCase.Add(new Vector(0.0, Level.Bottom + cCaseFront.Height / 2), 2); 528 cCase.ItemReceived += delegate(GameObject o) { GotItemFromCase(o); }; 529 cCase.ItemRelativePosition = new Vector((472 - 467.5), (455 - 204)); 530 cCase.Start(); 531 } 521 532 }, null); 522 533 } … … 550 561 Keyboard.Listen(Key.LeftShift, ButtonState.Released, delegate { walkBackwards = false; }, null); 551 562 552 #if DEBUG553 Keyboard.Listen(Key.C, ButtonState.Pressed, LuoChromaCase, null);554 Mouse.Listen(MouseButton.Left, ButtonState.Pressed, delegate { LuoJouniBoss(Mouse.PositionOnWorld, taistelija.Position); }, null);555 Mouse.IsCursorVisible = true;556 #endif557 563 } 558 564 … … 599 605 kenttaNro = 1; 600 606 607 paaseekoSeuraavaanKenttaan = true; 608 609 taistelija = null; 610 TriggerAction = null; 611 tActionTriggered = false; 612 613 601 614 ClearAll(); 602 615 LuoKentta(); -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora_mitja.cs
r6402 r6406 13 13 public partial class Attack_to_Agora : PhysicsGame 14 14 { 15 Image jouniBoss = LoadImage("jouniboss ");15 Image jouniBoss = LoadImage("jouniboss1"); 16 16 Animation jounibossArrive; 17 17 18 18 Elava currentBoss; 19 bool bossDefeated = false;19 AssaultRifle currentBossWeapon; 20 20 const double JOUNI_DMG = 25; 21 21 … … 99 99 } 100 100 101 void LuoJouniBoss(Vector luomisPaikka, Vector pysahtymisPaikka)102 { 103 Elava jouni = new Elava(jouniBoss, 100.0); // 10000101 void LuoJouniBoss(Vector luomisPaikka, double pysahtymisX) 102 { 103 Elava jouni = new Elava(jouniBoss, 5.0); // 10000 104 104 jouni.Kuoli += JouniDefeated; 105 105 jouni.Position = luomisPaikka; … … 107 107 jouni.Tag = "jouni"; 108 108 jouni.CollisionIgnoreGroup = 1; 109 jouni.Size *= 1.5; 109 jouni.IgnoresGravity = true; 110 jouni.IgnoresCollisionWith(taistelija); 110 111 Add(jouni); 111 112 … … 114 115 115 116 currentBoss = jouni; 116 bossDefeated = false;117 117 paaseekoSeuraavaanKenttaan = false; 118 118 119 120 PathFollowerBrain bBrain = new PathFollowerBrain(luomisPaikka, pysahtymisPaikka); 121 bBrain.Loop = false; 122 bBrain.Speed = 1500; 123 bBrain.WaypointRadius = jouni.Height / 2; 124 jouni.Brain = bBrain; 125 126 bBrain.ArrivedAtEnd += delegate { ActivateJouni(jouni, bBrain); }; 127 } 128 129 void ActivateJouni(Elava jouni, PathFollowerBrain brain) 119 jouni.NeedsUpdateCall = true; 120 jouni.IsUpdated = true; 121 jouni.Updated += delegate(PhysicsObject j) 122 { 123 Elava jP = j as Elava; 124 125 if (jP.X > pysahtymisX) 126 { 127 ActivateJouni(jP); 128 jouni.IsUpdated = false; 129 jouni.NeedsUpdateCall = false; 130 } 131 else jP.Velocity = new Vector(100.0, 0.0); 132 }; 133 } 134 135 void ActivateJouni(Elava jouni) 130 136 { 131 137 jouni.Animation = jounibossArrive; … … 135 141 136 142 jouni.MakeStatic(); 137 138 brain.Active = false; 139 jouni.Brain = null; // nothing personal 143 jouni.Stop(); 140 144 141 145 AssaultRifle jouninAse = new AssaultRifle(20, 10); … … 146 150 jouninAse.Tag = "jouninase"; 147 151 Add(jouninAse); 148 jouninAse.Position = jouni.Position + new Vector(jouni.Width / 3, 0.0); 152 jouninAse.Position = jouni.Position + new Vector(jouni.Width / 4, 0.0); 153 currentBossWeapon = jouninAse; 149 154 150 155 Timer ampumisAjastin = new Timer(); 151 ampumisAjastin.Interval = 0.2;156 ampumisAjastin.Interval = 1.0; 152 157 ampumisAjastin.Timeout += delegate 153 158 { … … 162 167 163 168 ammus.IgnoresGravity = true; 169 ammus.IsVisible = false; 170 ammus.IsUpdated = true; 171 ammus.NeedsUpdateCall = true; 172 ammus.Updated += delegate(PhysicsObject a) { DrawTracers(a, Color.Red, 0.3, 2); }; 164 173 165 174 AddCollisionHandler(ammus, delegate(PhysicsObject a, PhysicsObject p) { … … 177 186 }; 178 187 179 //ampumisAjastin.Start();188 ampumisAjastin.Start(); 180 189 } 181 190 182 191 void JouniDefeated() 183 192 { 184 paaseekoSeuraavaanKenttaan = true;185 193 currentBoss.Destroy(); 186 194 currentBoss = null; 187 195 jounihaviaa.Play(); 196 currentBossWeapon.Destroy(); 197 currentBossWeapon = null; 198 199 Timer.SingleShot(2.0, delegate { LuoChromaCase(ItemType.Knife);}); 188 200 } 189 201 -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Elava.cs
r6402 r6406 8 8 /// PlatformCharacter, jolla on elämälaskuri. 9 9 /// </summary> 10 public class Elava : P latformCharacter10 public class Elava : PhysicsObject 11 11 { 12 12 public DoubleMeter Elamat { get; private set; } … … 15 15 16 16 public Elava(double width, double height, double elamat) 17 : base(width, height)17 : base(width, height) 18 18 { 19 19 Elamat = new DoubleMeter(elamat, 0, elamat); 20 Elamat.LowerLimit += delegate 20 Elamat.LowerLimit += delegate 21 21 { 22 22 if (Kuoli != null) Kuoli(); 23 23 }; 24 25 KineticFriction = 0.0; 26 Restitution = 0.0; 27 CanRotate = false; 28 29 // This avoids high speeds, particularly when falling. This then avoids 30 // going through objects. 31 LinearDamping = 0.96; 32 33 24 34 } 25 35 26 36 public Elava(Image kuva, double elamat) 27 : this(kuva.Width, kuva.Height, elamat)37 : this(kuva.Width, kuva.Height, elamat) 28 38 { 29 39 this.Image = kuva; -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to AgoraContent/Attack to AgoraContent.contentproj
r6402 r6406 398 398 </ItemGroup> 399 399 <ItemGroup> 400 <Compile Include="jouni boss.png">401 <Name>jouni boss</Name>402 <Importer> TextureImporter</Importer>403 <Processor> TextureProcessor</Processor>400 <Compile Include="jounihaviaa.wav"> 401 <Name>jounihaviaa</Name> 402 <Importer>WavImporter</Importer> 403 <Processor>SoundEffectProcessor</Processor> 404 404 </Compile> 405 405 </ItemGroup> … … 412 412 </ItemGroup> 413 413 <ItemGroup> 414 <Compile Include="jouni haviaa.wav">415 <Name>jouni haviaa</Name>416 <Importer> WavImporter</Importer>417 <Processor> SoundEffectProcessor</Processor>414 <Compile Include="jouniboss1.png"> 415 <Name>jouniboss1</Name> 416 <Importer>TextureImporter</Importer> 417 <Processor>TextureProcessor</Processor> 418 418 </Compile> 419 419 </ItemGroup> -
2014/30/MitjaK/Attack to Agora/Attack to Agora/Muokattu Jypeli/Jypeli.csproj
r6337 r6406 63 63 <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> 64 64 <CodeAnalysisRuleDirectories>;C:\Programs\Programming\Visual Studio 2010\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> 65 <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> 66 </PropertyGroup> 67 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Visualize|x86'"> 68 <DebugSymbols>true</DebugSymbols> 69 <OutputPath>bin\x86\Visualize\</OutputPath> 70 <DefineConstants>TRACE;DEBUG;WINDOWS;UseDouble;JYPELI</DefineConstants> 71 <DocumentationFile>bin\x86\Debug\Jypeli.xml</DocumentationFile> 72 <NoStdLib>true</NoStdLib> 73 <DebugType>full</DebugType> 74 <PlatformTarget>x86</PlatformTarget> 75 <CodeAnalysisLogFile>bin\x86\Debug\Jypeli.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile> 76 <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> 77 <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> 78 <UseVSHostingProcess>false</UseVSHostingProcess> 79 <ErrorReport>prompt</ErrorReport> 80 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 81 <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> 82 <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> 83 <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> 65 84 <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> 66 85 </PropertyGroup>
Note: See TracChangeset
for help on using the changeset viewer.