- Timestamp:
- 2013-06-11 14:56:53 (10 years ago)
- Location:
- 2013/24/JoonasE/Mastermind/Mastermind
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/24/JoonasE/Mastermind/Mastermind/Mastermind/Mastermind.cs
r4065 r4071 16 16 PlatformCharacter pelaaja2; 17 17 18 18 Animation pelaajanKuva2; 19 19 Animation pelaajanKuva; 20 20 Image tahtiKuva = LoadImage("tahti"); 21 Image maa = LoadImage("block"); 21 22 22 23 SoundEffect maaliAani = LoadSoundEffect("maali"); … … 24 25 public override void Begin() 25 26 { 27 pelaajanKuva2 = LoadAnimation("stillblue"); 26 28 pelaajanKuva = LoadAnimation("still"); 27 29 … … 31 33 LisaaNappaimet(); 32 34 33 Camera.Follow(pelaaja1); 34 Camera.ZoomFactor = 1.2; 35 Camera.StayInLevel = true; 35 Camera.Follow(pelaaja1, pelaaja2); 36 36 37 } 37 38 … … 44 45 pelaaja2 = new PlatformCharacter(1, 1); 45 46 kentta.SetTileMethod('A', LisaaPelaaja); 46 //kentta.SetTileMethod('B', LisaaPelaaja2);47 kentta.SetTileMethod('B', LisaaPelaaja2); 47 48 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 48 49 Level.CreateBorders(); 49 Level.Background.CreateGradient(Color. White, Color.SkyBlue);50 Level.Background.CreateGradient(Color.BloodRed, Color.Blue); 50 51 } 51 52 … … 55 56 taso.Position = paikka; 56 57 taso.Color = Color.Green; 58 taso.Image = maa; 57 59 Add(taso); 58 60 } … … 77 79 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 78 80 Add(pelaaja1); 81 } 82 83 void LisaaPelaaja2(Vector paikka, double leveys, double korkeus) //, PlatformCharacter pelaaja, Animation paikallaan, Animation kavely) 84 { 85 pelaaja2 = new PlatformCharacter(leveys * 0.8, korkeus * 0.8); 86 pelaaja2.Position = paikka; 87 pelaaja2.Mass = 4.0; 88 pelaaja2.Animation = pelaajanKuva2; 89 pelaaja2.Animation.Start(); 90 AddCollisionHandler(pelaaja2, "tahti", TormaaTahteen); 91 Add(pelaaja2); 79 92 } 80 93 -
2013/24/JoonasE/Mastermind/Mastermind/MastermindContent/MastermindContent.contentproj
r4065 r4071 74 74 </Compile> 75 75 </ItemGroup> 76 <ItemGroup> 77 <Compile Include="block.png"> 78 <Name>block</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 </Compile> 82 <Compile Include="Danger block.png"> 83 <Name>Danger block</Name> 84 <Importer>TextureImporter</Importer> 85 <Processor>TextureProcessor</Processor> 86 </Compile> 87 </ItemGroup> 88 <ItemGroup> 89 <Compile Include="stillblue.anim"> 90 <Name>stillblue</Name> 91 <Importer>AnimationImporter</Importer> 92 <Processor>AnimationContentProcessor</Processor> 93 </Compile> 94 </ItemGroup> 76 95 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 77 96 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2013/24/JoonasE/Mastermind/Mastermind/MastermindContent/kentta1.txt
r4065 r4071 1 ################################ 2 # # 3 # N * # 4 #################### 1 ####################################################################################### 2 # # # 3 # # # # 4 # # # # # # # # 5 # B #### # # # # # # 6 ####################################################################################### 7 # ### # # # # # 8 # # # # # # 9 # # # ##### # 10 # A # # # # # 11 #######################################################################################
Note: See TracChangeset
for help on using the changeset viewer.