Ignore:
Timestamp:
2015-06-02 17:32:02 (8 years ago)
Author:
toolala
Message:
 
Location:
2015/23/ToukoA/FatalShot/FatalShot
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2015/23/ToukoA/FatalShot/FatalShot/FatalShot/FatalShot.cs

    r5856 r5858  
    1313    Image poliisiAmpuuKuva = LoadImage ("pelaajav1"); 
    1414        Image poliisinKuva = LoadImage ("pelaajav1"); 
     15 
     16    Image veriLantti = LoadImage ("verilantti"); 
    1517    Vector nopeusYlos = new Vector(0, 400); 
    1618    Vector nopeusAlas = new Vector(0, -400); 
     
    2830 
    2931        TileMap kentta = TileMap.FromLevelAsset("kentta"); 
    30         Level.Background.Color = Color.Brown; 
     32        Level.Background.Color = Color.Gray; 
    3133        kentta.SetTileMethod('%', luoPelaaja); 
    3234        kentta.SetTileMethod('#', lisaaTaso1); 
     
    6870        if (ammus != null) 
    6971        { 
    70             ase.Power.DefaultValue = 350; 
    71             ase.FireRate = 4; 
     72            ase.Power.DefaultValue = 200; 
     73            ase.FireRate = 8; 
    7274            ammus.Size *= 0.45; 
    7375            ammus.MaximumLifetime = TimeSpan.FromSeconds(4); 
     76             
    7477        } 
    7578 
     
    9497 
    9598        pelaajan1Ase = new AssaultRifle(30, 10); 
    96         pelaajan1Ase.Ammo.Value = 100; 
     99        //pelaajan1Ase.Ammo.Value = 100; 
     100        pelaajan1Ase.InfiniteAmmo = true; 
    97101        pelaajan1Ase.ProjectileCollision = AmmusOsui; 
    98102 
     
    111115 
    112116        FollowerBrain seuraajaAivot = new FollowerBrain(pelaaja1); 
     117        RandomMoverBrain randomAivot = new RandomMoverBrain(); 
     118        randomAivot.ChangeMovementSeconds = 3; 
    113119 
    114120        AssaultRifle pahisAse = new AssaultRifle(30, 10); 
     
    123129        seuraajaAivot.Active = true; 
    124130        seuraajaAivot.Speed = 400; 
    125         seuraajaAivot.DistanceClose = 450; 
    126         seuraajaAivot.DistanceFar = 5000; 
     131        seuraajaAivot.DistanceClose = 350; 
     132        seuraajaAivot.DistanceFar = 1000; 
     133 
     134        seuraajaAivot.FarBrain = randomAivot; 
    127135        seuraajaAivot.TargetClose += delegate { pahisAmpuu(pahisAse, pahis); }; 
    128136        seuraajaAivot.StopWhenTargetClose = true; 
     
    141149        if (ammus != null) 
    142150        { 
    143             ase.Power.DefaultValue = 350; 
     151            ase.Power.DefaultValue = 300; 
    144152            ase.FireRate = 8; 
     153            ase.CanHitOwner = false; 
    145154            ammus.Size *= 0.45; 
    146155            ammus.MaximumLifetime = TimeSpan.FromSeconds(4); 
     
    159168        if (kohde.Tag.Equals("paha")) 
    160169        { 
     170 
     171            Explosion rajahdys = new Explosion(5000); 
     172            rajahdys.Image = veriLantti; 
     173            rajahdys.MaxRadius = 70; 
     174            rajahdys.Force = 500; 
     175            rajahdys.Speed = 100; 
     176            rajahdys.Position = kohde.Position; 
     177            rajahdys.ShockwaveColor = new Color(0, 0, 0, 0); 
     178 
     179            Add(rajahdys); 
     180 
     181            GameObject verilantti = new GameObject(30, 30); 
     182            verilantti.Position = kohde.Position; 
     183            verilantti.Image = veriLantti; 
     184            //verilantti.IgnoresCollisionResponse = true; 
     185            Add(verilantti, -3); 
     186            //verilantti.MaxVelocity = 0; 
     187            //verilantti.CollisionIgnoreGroup = 1; 
     188 
    161189            (kohde as Pahis).Ase.Destroy(); 
     190            (kohde as Pahis).Destroy(); 
    162191        } 
    163192 
     
    165194        { 
    166195            (kohde as Hyvis).Ase.Destroy(); 
    167         } 
    168  
    169         kohde.Destroy(); 
     196            (kohde as Hyvis).Destroy(); 
     197        } 
     198 
    170199    } 
    171200 
  • 2015/23/ToukoA/FatalShot/FatalShot/FatalShotContent/FatalShotContent.contentproj

    r5856 r5858  
    5959    </Compile> 
    6060  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="verilantti.png"> 
     63      <Name>verilantti</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
    6168  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6269  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/23/ToukoA/FatalShot/FatalShot/FatalShotContent/kentta.txt

    r5856 r5858  
    1 .....#.......................############################## 
    2 .....#...........#.#########..#.......############..#.....# 
    3 .....#...........#########..#.......###############.#..#### 
    4 ####.#...........#########..#..............&&&&&..........# 
    5 .....#...........###########..&#.......###########.##.##### 
    6 ..%..#########################.&..#......#########..#.....# 
    7 .....#...........#....#.....######################..#.....# 
     1########################## 
     2#........................# 
     3#............#...........# 
     4#%...........&.&.&.......# 
     5#............#...........# 
     6#....&...................# 
     7#........................# 
     8#........................# 
     9#........................# 
     10#........................# 
     11#........................# 
     12#........................# 
     13#........................# 
     14#........................# 
     15#........................# 
     16#........................# 
     17########################## 
Note: See TracChangeset for help on using the changeset viewer.