Changeset 6711 for 2015/27/ohjaajat


Ignore:
Timestamp:
2015-07-01 22:47:21 (4 years ago)
Author:
sieerinn
Message:

Hienot kenttäsiirtymät otettu pois :(

File:
1 edited

Legend:

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

    r6708 r6711  
    7676    List<StoryItem> storyItems = new List<StoryItem>(); 
    7777 
     78    private bool canUseExit = true; 
     79 
    7880    public IntMeter BossHealth; 
    79     private List<Vector> bossSpawnPositions = new List<Vector>();  
     81    private List<Vector> bossSpawnPositions = new List<Vector>(); 
    8082 
    8183    private CycleSlot currentItem; // Laatikossa näkyvä nykyinen kama. 
     
    325327        //CreatePlayer(new Vector(-Level.Width/3, Level.Bottom + TILE_SIZE * 2)); 
    326328        SetControls(); 
    327         //Camera.ZoomToLevel(); 
     329         
    328330        Camera.Follow(player); 
    329331        Camera.ZoomFactor = 2.0; 
     
    472474    { 
    473475        var oldExit = pExit as Exit; 
     476        if (oldExit == null || oldExit.TargetLevel == null || pExit.IsDestroying || pExit.IsDestroyed) 
     477            return; 
     478 
     479        enemies.Clear(); 
     480        ClearAll(); 
     481 
     482        CreateLevel(oldExit.TargetLevel); 
     483        var targetExit = exits.FirstOrDefault(e => e.Name == oldExit.TargetExitName); 
     484         
     485        BuildUI(); 
     486        SetControls(); 
     487        player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2; 
     488        Add(player); 
     489    } 
     490 
     491    /* 
     492    void CollidesWithExitFail(PhysicsObject pPlayer, PhysicsObject pExit) 
     493    { 
     494        if (!canUseExit) 
     495            return; 
     496 
     497        canUseExit = false; 
     498        Timer.SingleShot(6, () => canUseExit = true); 
     499 
     500        var oldExit = pExit as Exit; 
    474501        if (oldExit == null || transition || oldExit.TargetLevel == null || pExit.IsDestroying || pExit.IsDestroyed) 
    475502            return; 
     
    514541 
    515542            // Yritetään päätellä pelaajalle joku järkevä paikka. 
    516             player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2; 
     543            player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 4; 
    517544             
    518             Camera.Follow(player); 
    519             Camera.ZoomFactor = 2.0; 
     545            //Camera.Follow(player); 
     546            //Camera.ZoomFactor = 2.0; 
    520547            return; 
    521548        } 
     
    545572            obj.Position += transitionVector; 
    546573        } 
    547         player.Position += transitionVector + Direction.Inverse(dir).GetVector() * TILE_SIZE * 4; 
     574        //player.Position += transitionVector + Direction.Inverse(dir).GetVector() * TILE_SIZE * 4; 
     575        player.Position = targetExit.Position + Direction.Inverse(targetExit.Position.Angle.MainDirection).GetVector() * TILE_SIZE * 2; 
    548576 
    549577        // Zoomataan kameraa sopivasti ja liikutetaan se vanhan kentän päälle, josta se sitten siirtyy uuden kentän päälle. 
    550578        Camera.Position += transitionVector; 
    551579        Vector pos = Camera.Position; 
    552         Camera.Follow(player); 
    553         Camera.ZoomFactor = 2.0; 
     580        //Camera.Follow(player); 
     581        //Camera.ZoomFactor = 2.0; 
    554582        Camera.Position = pos; 
    555583    } 
     584     */ 
    556585 
    557586    /// <summary> 
Note: See TracChangeset for help on using the changeset viewer.