在模拟目标C蜡烛的火焰 [英] Simulating a candle flame in Objective C

查看:122
本文介绍了在模拟目标C蜡烛的火焰的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为当前项目的一部分,我一直在问到显示屏幕上的蜡烛。用户应该能够倾斜装置倾斜的火焰,并执行操作(如自来水)吹灭火焰。我在如何实现这一真正的损失。一些想法我有:

As part of a current project I've been asked to display a candle onscreen. Users should be able to tilt the device to tilt the flame, and perform an action (eg. tap) to blow out the flame. I'm at a real loss on how to achieve this. Some ideas I've had:


  • 从股票视频网站购买电影蜡烛。这不会让我倾斜或虽然吹灭火焰

  • 获得帧数和动画他们给一个闪烁的火焰
  • 的外观
  • 使用某种形式的粒子发射器的

我想我的preference很可能是使用了粒子发射器,因为我看不到视频工作,并获得必要的资产为帧动画可能是一个问题。我知道的Cocos2D有一个粒子发射器,但这是不能被撕开分开一个更大的UIKit项目的一部分,并再次启动建立在cocos2d的顶部。

I guess my preference would probably be to use the particle emitter, as I can't see the video working and getting the necessary assets for the frame animation could be a problem. I know Cocos2D has a particle emitter, but this is part of a larger UIKit project which can't be ripped apart and started again to build on top of Cocos2D.

有没有人对我怎么能做到这一点任何想法?

Does anyone have any ideas on how I can achieve this?

推荐答案

您可以看看在讷河教程粒子的产生:

You could look at the Nehe tutorial on particle generation:

http://nehe.gamedev.net/data/lessons/ lesson.asp?节课= 19

这不会是很难适应这种生产的东西,看起来像蜡烛一样。

It wouldn't be hard to adapt this to produce something that looks like a candle.

(您可以嵌入另一种观点认为这里面GL观点。)

(You can embed a GL view inside another view for this.)

这篇关于在模拟目标C蜡烛的火焰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆