void Reset() override { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->SetDisableGravity(true); me->SetCanFly(true); SetCombatMovement(false); MoveToNextPoint(); Initialize(); }
void Reset() { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->SetDisableGravity(true); me->SetCanFly(true); SetCombatMovement(false); MoveToNextPoint(); RangeCheckTimer = 0.5*IN_MILLISECONDS; }
void Reset() { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->SetLevitate(true); me->SetFlying(true); SetCombatMovement(false); MoveToNextPoint(); m_uiRangeCheckTimer = IN_MILLISECONDS; }
void Reset() { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SetFlying(true); SetCombatMovement(false); MoveToNextPoint(); m_uiRangeCheckTimer = 500; }
void MovementInform(uint32 uiType, uint32 uiId) { if (uiType != POINT_MOTION_TYPE) return; switch (uiId) { case 0: if (urand(0, 3) == 0) MoveToNextPoint(); else me->DisappearAndDie(); break; } }
void MovementInform(uint32 uiType, uint32 uiId) { if (uiType != POINT_MOTION_TYPE) return; switch (uiId) { case 0: if (urand(0, 3) == 0) MoveToNextPoint(); else me->DespawnOrUnsummon(); break; } }
void Test::LoadResources() { time = 0.f; isFinished = false; skipFrames = 100; Scene *scene = new Scene(); scene->AddNode(scene->GetRootNode(fullName)); DVASSERT_MSG(scene, "Could not load the scene"); Camera* cam = new Camera(); scene->AddCamera(cam); Core* core = DAVA::Core::Instance(); float32 aspect = core->GetVirtualScreenHeight() / core->GetVirtualScreenWidth(); cam->Setup(70.f, aspect, 1.f, 5000.f); cam->SetLeft(Vector3(1, 0, 0)); cam->SetUp(Vector3(0, 0, 1)); scene->SetCurrentCamera(cam); SafeRelease(cam); UI3DView *sceneView = new UI3DView(Rect(0, 0, GetSize().x, GetSize().y)); sceneView->SetScene(scene); AddControl(sceneView); SafeRelease(sceneView); Landscape* landscape = GetLandscape(); DVASSERT_MSG(scene, "There is no landscape in a scene"); landscape->SetTiledShaderMode(Landscape::TILED_MODE_TEXTURE); uint32 textureMemory = TextureHelper::GetSceneTextureMemory(scene, GetFilePath()); testData.SetTextureMemorySize(textureMemory); File* file = File::Create(fullName, File::OPEN | File::READ); DVASSERT_MSG(file, "Could not open file scene file"); testData.SetSceneFileSize(file->GetSize()); SafeRelease(file); PreparePath(); PrepareFpsStat(); PrepareCameraAnimation(); ZeroCurFpsStat(); MoveToNextPoint(); SafeRelease(scene); }
void Test::AnimationFinished(DAVA::BaseObject *, void *, void *) { MoveToNextPoint(); camMoveAnimation = NULL; }