void CPlayerBase::Win() { PROFILE_FUNCTION("win base"); TCompTransform* player_transform = myEntity->get<TCompTransform>(); VEC3 player_position = player_transform->getPosition(); if (!cc->OnGround()) { Falling(); } orbitCameraDeath(); ChangeState("idle"); ChangeCommonState("idle"); }
func Check() { var clnk; if(GetAction()S="Falling") return(Falling()); while(clnk=FindObject(0,-25,0,50,100,OCF_CrewMember(),0,0,0,clnk)) if(GetAlive(clnk) && !Random(2)) { Sound("Earthquake"); SetAction("Falling"); SetPhase(phase); RemoveVertex(0); RemoveVertex(0); } }
void Character::Update() { //Ai module for character if (aiEnabled_) { if (GetCurrentPositionX() - GetMoveSpeedDelta() <= 0) { SetKeyRight(true); SetKeyLeft(false); } else if (GetCurrentPositionX() + GetWidth() + GetMoveSpeedDelta() >= mapWidth_) { SetKeyLeft(true); SetKeyRight(false); } if (KeyRight_) { CollisionMovingRight(); } else if (KeyLeft_) { CollisionMovingLeft(); } //Characters forever in a state of falling? if (GetCharacterYAxisState() == CHARACTERYAXISSTATES::CHARACTERFALLING || GetCharacterYAxisState() == CHARACTERYAXISSTATES::CHARACTERONGROUND) { Falling(); } else if (GetCharacterYAxisState() == CHARACTERYAXISSTATES::CHARACTERJUMPING) { Jumping(); } } }
bool Physics::addFallSimulation(uint8_t block, vec pos, uint32_t EID) { fallSimList.push_back(Falling(block,pos,EID)); return true; }