Changeset 7734 for 2016/27/ohjaajat


Ignore:
Timestamp:
2016-07-04 17:25:02 (3 years ago)
Author:
sieerinn
Message:

Liikkuvia tasanteita

Location:
2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore
Files:
3 edited

Legend:

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

    r7658 r7734  
    101101            var len = Math.Sqrt(Math.Pow(obj.Width * 0.5, 2) + Math.Pow(obj.Height * 0.5, 2)); 
    102102            var positionFix = Vector.FromLengthAndAngle(len, angle + Angle.FromRadians(-Math.Atan2(obj.Height, obj.Width))); 
    103             method(topLeft + positionFix, obj.Width, obj.Height, angle, shape, obj.Name, obj.Properties); 
     103            method(topLeft + positionFix, obj.Width, obj.Height, angle, shape, obj.Type, obj.Properties); 
    104104        } 
    105105    } 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r7733 r7734  
    2121        objectMethods.Add("ball", TestBall); 
    2222        objectMethods.Add("player", CreatePlayer); 
     23        objectMethods.Add("moving", CreatePlayer); 
    2324 
    2425        var tileMap = TiledTileMap.FromLevelAsset("thehub"); 
     
    5657    { 
    5758         
     59    } 
     60 
     61    private void CreateMovingPlatform(Vector position, double width, double height, Dictionary<string, string> properties) 
     62    { 
     63        var dirX = double.Parse(properties["directionx"]); 
     64        var dirY = double.Parse(properties["directiony"]); 
     65        var distance = double.Parse(properties["distance"]); 
     66        var platform = new MovingPlatform(position, new Vector(dirX, dirY), distance, width, height); 
     67        Add(platform); 
    5868    } 
    5969 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.csproj

    r7653 r7734  
    111111  </ItemGroup> 
    112112  <ItemGroup> 
     113    <Compile Include="MovingPlatform.cs" /> 
    113114    <Compile Include="TiledTileMap.cs" /> 
    114115    <Compile Include="VenienteFragore.cs" /> 
Note: See TracChangeset for help on using the changeset viewer.