void cFlyon::Set_Direction(const ObjectDirection dir) { // already set if (dir == m_direction) { return; } if (dir != DIR_UP && dir != DIR_DOWN && dir != DIR_LEFT && dir != DIR_RIGHT) { printf("Error : Unknown Flyon direction %d\n", m_direction); return; } cEnemy::Set_Direction(dir, 1); // clear Set_Rotation(0.0f, 0.0f, 0.0f, 1); if (m_start_direction == DIR_UP) { // default } else if (m_start_direction == DIR_LEFT) { Set_Rotation_Z(270.0f, 1); } else if (m_start_direction == DIR_RIGHT) { Set_Rotation_Z(90.0f, 1); } else if (m_start_direction == DIR_DOWN) { Set_Rotation_Z(180.0f, 1); } Set_Velocity(0.0f, 0.0f); Update_Dest_Vel(); }
void cEato::Set_Direction(const ObjectDirection dir) { if (m_start_direction == dir) { return; } cEnemy::Set_Direction(dir, 1); Set_Rotation(0.0f, 0.0f, 0.0f, 1); if (m_start_direction == DIR_UP_LEFT) { Set_Rotation_Y(180.0f, 1); } else if (m_start_direction == DIR_UP_RIGHT) { } else if (m_start_direction == DIR_LEFT_UP) { Set_Rotation_Z(90.0f, 1); Set_Rotation_X(180.0f, 1); } else if (m_start_direction == DIR_LEFT_DOWN) { Set_Rotation_Z(90.0f, 1); } else if (m_start_direction == DIR_RIGHT_UP) { Set_Rotation_Z(270.0f, 1); } else if (m_start_direction == DIR_RIGHT_DOWN) { Set_Rotation_Z(270.0f, 1); Set_Rotation_X(180.0f, 1); } else if (m_start_direction == DIR_DOWN_LEFT) { Set_Rotation_X(180.0f, 1); } else if (m_start_direction == DIR_DOWN_RIGHT) { Set_Rotation_Z(180.0f, 1); } Create_Name(); }
void cStaticEnemy::DownGrade(bool force) { Set_Dead(1); m_massive_type = MASS_PASSIVE; m_counter = 0.0f; m_velx = 0.0f; m_vely = 0.0f; Set_Scale_Directions(1, 1, 1, 1); Set_Rotation_Z(180.0f); }
void cEato::DownGrade(bool force) { Set_Dead(1); m_massive_type = MASS_PASSIVE; m_counter = 0.0f; if (!force) { cParticle_Emitter* anim = new cParticle_Emitter(); Generate_Hit_Animation(anim); anim->Set_Scale(0.8f); anim->Set_Direction_Range(0.0f, 360.0f); pAnimation_Manager->Add(anim); } else { Set_Rotation_Z(180.0f); } }
void cFlyon::DownGrade(bool force /* = 0 */) { Set_Dead(1); m_massive_type = MASS_PASSIVE; m_counter = 0.0f; m_velx = 0.0f; m_vely = 0.0f; if (!force) { // animation cParticle_Emitter* anim = new cParticle_Emitter(m_sprite_manager); Generate_Hit_Animation(anim); anim->Set_Speed(5.0f, 0.6f); anim->Set_Scale(0.8f); anim->Emit(); pActive_Animation_Manager->Add(anim); } else { Set_Rotation_Z(180.0f); } }
void cSpikeball :: DownGrade( bool force /* = 0 */ ) { Set_Dead( 1 ); m_massive_type = MASS_PASSIVE; m_counter = 0.0f; m_velx = 0.0f; m_vely = 0.0f; // dead image Set_Image_Num( 9 ); Set_Animation( 0 ); // default stomp death if( !force ) { Generate_Hit_Animation(); Set_Scale_Directions( 1, 0, 1, 1 ); } // falling death else { Set_Rotation_Z( 180 ); Set_Scale_Directions( 1, 1, 1, 1 ); } }