Ignore:
Timestamp:
2015-07-02 08:32:56 (4 years ago)
Author:
sieerinn
Message:

Pelin voi nyt teoriassa pelata alusta loppuun läpi.

File:
1 edited

Legend:

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

    r6716 r6717  
    104104    public static Image GrenadeImage = LoadImage("gran"); 
    105105    public static Image GrenadeSmallImage = LoadImage("gransmall"); 
     106    public static Image MaskImage = LoadImage("helm"); 
     107    public static Image MaskLargeImage = LoadImage("helmlarge"); 
    106108 
    107109    public static Image GrenadeBoxImage = LoadImage("grenadebox"); 
     
    377379        Add(player, 1); 
    378380 
    379         player.Sword = new Sword(player); 
    380         player.Inventory.Add(new Pistol(player)); 
    381381        player.Inventory.Add(new Monocle(player)); 
    382         player.Inventory.Add(new Grenade(player)); 
     382 
     383        //player.Sword = new Sword(player); 
     384        //player.Inventory.Add(new Pistol(player)); 
     385        //player.Inventory.Add(new Grenade(player)); 
    383386 
    384387        //player.Health.Value = 3; // Alkuun vain kolme sydäntä. 
     
    412415 
    413416        AddCollisionHandler(player, "storyTime", StoryTime); 
    414     } 
    415  
    416  
    417     void StoryTime(PhysicsObject player, PhysicsObject storyBlock) 
     417 
     418        AddCollisionHandler(player, "pistol", delegate(PhysicsObject p, PhysicsObject item) 
     419        { 
     420            item.Destroy(); 
     421            player.Inventory.Add(new Pistol(player)); 
     422            UpdateItemCycleImages(); 
     423        }); 
     424 
     425        AddCollisionHandler(player, "grenade", delegate(PhysicsObject p, PhysicsObject item) 
     426        { 
     427            item.Destroy(); 
     428            player.Inventory.Add(new Grenade(player)); 
     429            UpdateItemCycleImages(); 
     430        }); 
     431 
     432        AddCollisionHandler(player, "mask", delegate(PhysicsObject p, PhysicsObject item) 
     433        { 
     434            item.Destroy(); 
     435            player.Inventory.Add(new Mask(player)); 
     436            UpdateItemCycleImages(); 
     437        }); 
     438    } 
     439 
     440 
     441    void StoryTime(PhysicsObject pPlayer, PhysicsObject storyBlock) 
    418442    { 
    419443        storyItems.Add(new StoryItem(new Queue<string>(new[] { "Oi, boy!", 
     
    430454        storyBlock.IgnoresCollisionResponse = true; 
    431455 
     456        if (player.Sword == null) 
     457        { 
     458            player.Sword = new Sword(player); 
     459        } 
     460 
    432461        ShowTextItem(storyItems[1]); 
    433462        BuildRightBar(); 
     
    510539 
    511540        canUseExit = false; 
    512         Timer.SingleShot(6, () => canUseExit = true); 
     541        Timer.SingleShot(2, () => canUseExit = true); 
    513542 
    514543        var oldExit = pExit as Exit; 
Note: See TracChangeset for help on using the changeset viewer.