Ignore:
Timestamp:
2015-07-01 16:20:43 (4 years ago)
Author:
empaheik
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs

    r6632 r6697  
    6666        enemy.Health.LowerLimit += enemy.Destroy; 
    6767 
    68         /* 
    69         Timer updateTimer = new Timer(); 
    70         updateTimer.Interval = 0.02; 
    71         updateTimer.Timeout += delegate 
    72         { 
    73             if (!(enemy.Brain is FollowerBrain)) 
    74             { 
    75                  
    76             } 
    77             enemy.UpdateCreature(Time); 
    78         }; 
    79         updateTimer.Start(); 
    80          */ 
    81     } 
    82  
    83     /// <summary> 
    84     /// Luo pelaajan. 
    85     /// </summary> 
    86     void CreatePlayer(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 
    87     { 
    88         player = new Player(); 
    89         player.CanRotate = false; 
    90         player.MovementSpeed = new DoubleMeter(2300, 0, 2300); 
    91         player.Position = position; 
    92         player.MoveAnimations = DirectionalAnimations(playerWalkLeft, playerWalkRight, playerWalkUp, playerWalkDown); 
    93         player.SwingAnimations = DirectionalAnimations(playerSwingLeft, playerSwingRight, playerSwingUp, playerSwingDown); 
    94         player.ShootAnimations = DirectionalAnimations(playerShootLeft, playerShootRight, playerShootUp, playerShootDown); 
    95         player.Image = playerWalkDown.CurrentFrame; 
    96         Add(player, 1); 
    97  
    98         player.Sword = new Sword(player); 
    99         player.Inventory.Add(new Pistol(player)); 
    100         player.Inventory.Add(new Monocle(player)); 
    101         player.Inventory.Add(new Grenade(player)); 
    102  
    103         player.Health.Value = 3; // Alkuun vain kolme sydäntä. 
    104  
    105         AddCollisionHandler(player, "exit", CollidesWithExit); 
    106         AddCollisionHandler(player, "enemy", delegate(PhysicsObject p, PhysicsObject e) 
    107         { 
    108             player.Health.Value--; 
    109         }); 
    11068    } 
    11169 
Note: See TracChangeset for help on using the changeset viewer.