Changeset 6542 for 2015


Ignore:
Timestamp:
2015-06-29 20:53:28 (4 years ago)
Author:
sieerinn
Message:

Kenttäsiirtymää muokattu.

File:
1 edited

Legend:

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

    r6541 r6542  
    5757    private Creature player; 
    5858 
    59     private bool transition = false; 
     59    private bool transition; 
    6060    List<GameObject> oldObjects = new List<GameObject>(); 
    6161    List<Exit> exits = new List<Exit>(); 
     
    202202        double dt = gameTime.SinceLastUpdate.TotalSeconds; 
    203203 
    204         const double transitionSpeed = 5.0; 
     204        const double transitionSpeed = 500.0; 
    205205 
    206206        if (transition) 
    207207        { 
    208             Camera.Position += Camera.Position * -transitionSpeed * dt; 
     208            Camera.Position += Camera.Position.Normalize() * -transitionSpeed * dt; 
    209209 
    210210            // Siirtymä on ohi, jatketaan peliä ja poistetaan edellinen kenttä. 
    211             if (Camera.Position.Magnitude < 1.0) 
     211            if (Camera.Position.Magnitude < transitionSpeed * dt) 
    212212            { 
    213213                transition = false; 
Note: See TracChangeset for help on using the changeset viewer.