Ignore:
Timestamp:
2016-07-08 08:39:25 (3 years ago)
Author:
sieerinn
Message:

Kenttiä muokkailtu ja liikkuville tasanteille kuva

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/LevelCreationMethods.cs

    r8012 r8015  
    138138 
    139139            adven.AddCollisionHandler("death", (a, b) => adven.Die()); 
    140             adven.AddCollisionHandler("collectible", (a, b) => pointsCounter.Value += 1000); 
     140            adven.AddCollisionHandler("collectible", (a, b) => 
     141            { 
     142                pointsCounter.Value += 1000; 
     143                b.Destroy(); 
     144            }); 
    141145 
    142146            adven.Died += () => 
     
    223227            collectible.Position = position; 
    224228            collectible.Tag = "collectible"; 
     229            collectible.IgnoresCollisionResponse = true; 
    225230            collectible.Shape = Shape.CreateRegularPolygon(RandomGen.NextInt(3, 8)); 
    226231            collectible.Color = Color.Purple; 
     
    236241            var distance = double.Parse(properties["distance"]); 
    237242            var platform = new MovingPlatform(position, new Vector(dirX, dirY), distance, width, height); 
     243            platform.Image = platformImage; 
     244            platform.TextureWrapSize = new Vector(width / TileSize, 1.0); 
    238245            Add(platform); 
    239246        } 
     
    282289            tile.IgnoresCollisionResponse = true; 
    283290            Add(tile, 3); 
     291            SetTile(x, y, tile); 
     292        } 
     293 
     294        private void BackgroundTile(int x, int y, Image image, string layerName, Dictionary<string, string> properties) 
     295        { 
     296            var tile = new SimplePhysics.Object(TileSize, TileSize) { IsStatic = true }; 
     297            tile.Image = image; 
     298            tile.IgnoresCollisionResponse = true; 
     299            Add(tile, -3); 
    284300            SetTile(x, y, tile); 
    285301        } 
Note: See TracChangeset for help on using the changeset viewer.