This project is read-only.

Animation Classes

There are a few 2D animation classes that help move and scale objects.


	CIw2DImage* img		= Iw2DCreateImage("smiley.png");
	CIwFVec2 position	= CIwFVec2(0.0f, 0.0f);
	CIwFVec2 size		= CIwFVec2(img->GetWidth() * 2, img->GetHeight() * 2);

	// The trajectories are designed to work for 3D space, which is why you need to
	// convert the vector from vec2 to vec3 and back to vec2 again.
	Trajectory shoot = Trajectory(GameTime, Vector2To3(position), 11.0f, 80.0f, 9.0f);
	position = Vector3To2(shoot.Update(GameTime));

	Iw2DDrawImage(img, position, size);

Last edited Sep 11, 2013 at 6:21 PM by cbutcher, version 1


No comments yet.