Ignore:
Timestamp:
Apr 29, 2012, 11:55:32 PM (9 years ago)
Author:
sam
Message:

core: tick methods now use seconds, like any sane system.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mrpigeon/blueenemy.cpp

    r1300 r1310  
    3030
    3131    m_position = vec3(512, 81, 0);
    32     m_velocity = vec3(-0.15f, 0, 0);
     32    m_velocity = vec3(-150.f, 0, 0);
    3333}
    3434
    35 void BlueEnemy::TickGame(float deltams)
     35void BlueEnemy::TickGame(float seconds)
    3636{
    37     Enemy::TickGame(deltams);
     37    Enemy::TickGame(seconds);
    3838
    39     deltams *= game->GetSpeed();
     39    seconds *= game->GetSpeed();
    4040
    41     enemytime = fmod(deltams + enemytime, 700.0f);;
     41    enemytime = fmod(seconds + enemytime, .7f);;
    4242
    43     m_position += m_velocity * deltams;
     43    m_position += m_velocity * seconds;
    4444}
    4545
    46 void BlueEnemy::TickDraw(float deltams)
     46void BlueEnemy::TickDraw(float seconds)
    4747{
    48     WorldEntity::TickDraw(deltams);
     48    WorldEntity::TickDraw(seconds);
    4949
    5050    /* + 48 because of vertical flip */
    51     Scene::GetDefault()->AddTile(m_position.x > 255 ? enemy_casualblue : enemy_casualblueattack, (int)(enemytime * 6 / 700.0f), m_position + vec3(48.0f, 0, 0), 0, vec2(-3.0f, 3.0f));
     51    Scene::GetDefault()->AddTile(m_position.x > 255 ? enemy_casualblue : enemy_casualblueattack, (int)(enemytime * 6 / .7f), m_position + vec3(48.0f, 0, 0), 0, vec2(-3.0f, 3.0f));
    5252}
    5353
Note: See TracChangeset for help on using the changeset viewer.