iPhone 2D游戏开发和角色动画

发布于 2025-01-02 18:52:10 字数 192 浏览 3 评论 0原文

我正在开发一款 2D 游戏,基本上我的角色站在我的 iPhone 舞台中间踢球。 我将角色构建为矢量(使用插画),我想知道是否可以在 After Effects 中对其进行动画处理并以任何格式导出(我知道我应该使用 .png )我可以在我的 iphone 游戏中使用。 该角色不会与用户进行任何交互,并且基本上会循环(踢球)直到用户退出游戏。

谢谢 卢卡

Im working on a 2d game where I do basically have my character standing in the middle of my iphone stage kicking balls.
I build the character as a vector (with illustrator) and I want to know if is possible to animate it in after effects and export it in whatever format (I know I should use .png ) I can use in my iphone game..
The character won't have any interaction with the user and it will basically loop (kicking balls) untile the user quit the game.

thanks
Luca

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沫雨熙 2025-01-09 18:52:10

,最好的格式是PNG,所以你可以这样做:

NSMutableArray* myImages = [[[NSMutableArray alloc] initWithCapacity:122] autorelease];
for( int i = 1; i <= 122; i++ ) {
    NSString* filename = [NSString stringWithFormat:@"animation_%d.png",i];
    UIImage* image = [UIImage imageNamed: filename];
    [myImages addObject: image];

}

myAnimation.animationImages = myImages;
[myAnimation setAnimationRepeatCount:10];
myAnimation.animationDuration = 0;
[myAnimation startAnimating];

是的,这是可能的;)但是要小心你的图片帧不应该是一个长动画,你可以使用UIImage来显示动画 122是动画帧。

Yes its possible ;) but be careful your picture frames should not be a long animation , you can use UIImage to show an animation , the best format is PNG , so you can do it like this :

NSMutableArray* myImages = [[[NSMutableArray alloc] initWithCapacity:122] autorelease];
for( int i = 1; i <= 122; i++ ) {
    NSString* filename = [NSString stringWithFormat:@"animation_%d.png",i];
    UIImage* image = [UIImage imageNamed: filename];
    [myImages addObject: image];

}

myAnimation.animationImages = myImages;
[myAnimation setAnimationRepeatCount:10];
myAnimation.animationDuration = 0;
[myAnimation startAnimating];

the nubmer 122 is the animation frames .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文