本文整理汇总了C++中Animation::AddEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ Animation::AddEvent方法的具体用法?C++ Animation::AddEvent怎么用?C++ Animation::AddEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animation
的用法示例。
在下文中一共展示了Animation::AddEvent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveFromManagerAnimation
Animation* GameObject::RemoveFromManagerAnimation(int32 track)
{
Animation * animation = new Animation(this, 0.001f, Interpolation::LINEAR);
animation->AddEvent(Animation::EVENT_ANIMATION_START, Message(this, &GameObject::RemoveFromManagerAnimation));
animation->Start(track);
return animation;
}
示例2: GetVolume
Animation * SoundInstance::VolumeAnimation(float32 newVolume, float32 time, int32 track /*= 0*/)
{
animatedVolume = GetVolume();
Animation * a = new LinearAnimation<float32>(this, &animatedVolume, newVolume, time, Interpolation::LINEAR);
a->AddEvent(Animation::EVENT_ANIMATION_END, Message(this, &SoundInstance::OnVolumeAnimationEnded));
Retain();
a->Start(track);
return a;
}
示例3: Animation
Animation * GameObject::VisibleAnimation(bool visible, int32 track/* = 0*/)
{
//TODO: change to bool animation - Dizz
Animation * animation = new Animation(this, 0.01f, Interpolation::LINEAR);
bool * params = new bool[1];
params[0] = visible;
animation->AddEvent(Animation::EVENT_ANIMATION_START, Message(this, &GameObject::VisibleAnimationCallback, (void*)params));
animation->Start(track);
return animation;
}
示例4: ShowHint
void HintManager::ShowHint(const WideString &hintMessage, const DAVA::Rect &controlRectAbsolute)
{
if(0 != hintMessage.length())
{
//Add control
HintControl *hintControl = new HintControl();
hintControl->SetText(hintMessage);
Rect screenRect = UIScreenManager::Instance()->GetScreen()->GetRect(true);
Vector2 requestedSize = hintControl->GetSize();
if(requestedSize.dx < controlRectAbsolute.GetSize().dx)
{
Vector2 pos(controlRectAbsolute.x - screenRect.x, controlRectAbsolute.y - screenRect.y + controlRectAbsolute.dy);
hintControl->SetPosition(pos);
}
else if(controlRectAbsolute.x - screenRect.x < requestedSize.dx)
{
Vector2 pos(controlRectAbsolute.x - screenRect.x, controlRectAbsolute.y - screenRect.y + controlRectAbsolute.dy);
hintControl->SetPosition(pos);
}
else
{
Vector2 pos(controlRectAbsolute.x - screenRect.x + controlRectAbsolute.dx - requestedSize.dx, controlRectAbsolute.y - screenRect.y + controlRectAbsolute.dy);
hintControl->SetPosition(pos);
}
ControlsFactory::AddBorder(hintControl);
UIScreenManager::Instance()->GetScreen()->AddControl(hintControl);
Animation *hintAlphaAnimation = hintControl->ColorAnimation( Color::Transparent(), NOTIFICATION_TIME,
Interpolation::EASY_IN, 2);
hintAlphaAnimation->AddEvent(Animation::EVENT_ANIMATION_END,
Message(this, &HintManager::OnAlphaAnimationDone, hintControl));
hints.push_back(hintControl);
}
}
示例5: SetupAnimation
void SceneEditorScreenMain::SetupAnimation()
{
float32 minutes = EditorSettings::Instance()->GetAutosaveTime();
Animation * anim = WaitAnimation(minutes * 60.f);
anim->AddEvent(Animation::EVENT_ANIMATION_END, Message(this, &SceneEditorScreenMain::AutoSaveLevel));
}