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; }
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; }
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; }
Animation * GameObject::WaitAnimation(float32 time, int32 track) { Animation * animation = new Animation(this, time, Interpolation::LINEAR); animation->Start(track); return animation; }