时间Time知识点

// 主要用于游戏中参与位移、计时、时间暂停等

1、时间缩放比例

// 时间停止
Time.timeScale = 0;

// 回复正常
Time.timeScale = 1;

// 2倍速
Time.timeScale = 2;

2、帧间隔时间

// 帧间隔时间:最近的一帧用了多长时间(秒),每一帧耗时都不同

// 注意,在Unity中都是以最快速度运行,但在实际情况下需要代码控制帧率,
// 否则对CPU性能消耗很大

// 帧间隔时间主要用于计算位移:路程=时间*速度。根据需求选择计算的间隔时间,
// 如果希望游戏暂停时就不动的,使用Time.deltaTime,不受暂停影响使用Time.unscaledDeltaTime;

受scale影响:Time.deltaTime

不受scale影响:Time.unscaledDeltaTime

两者的比例与timeScale相同

3、游戏开始到现在的时间

//主要用来计时,多用于单机游戏,网络游戏多以服务器时间为主

受scale影响:Time.time

不受scale影响:Time.unscaledTime

4、物理帧间隔时间,即FixedUpdate设置的时间

受scale影响:Time.fixedDeltaTime

不受scale影响:Time.fixedUnscaledDeltaTime

5、帧数

// 从开始到现在游戏跑了多少帧

Time.frameCount
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2021年高考英语必背知识点以及常用句型 句型1 as if/though+主语+did/had done…好像……表示现在或将来的情况用过去时;表示过去的情况用过去完成时 [例句] Our head teacher treats us as if we were her own children, so all the students in our class think highly of her. Alan talked about Rome as if he had been there. Alan谈起罗马来就好像他去过那里似的。 句型2 "wish +宾语从句",表示不大 可能实现的愿望 表示现在的愿望:主语+过去时; 表示过去的愿望:主语+had done; 表示将来的愿望:主语+would/could do [例句] How I wish we students had more free time to relax ourselves! 我们学生多么希望有更多的自由时间放松自己! I failed in the maths exam. How I wish I hadn't wasted so much time playing! What a pity you can't go to the party. How I wish I could dance with you at the party! 句型3 would rather that somebody did…"宁愿……;更愿意……"表示现在或将来的愿望 would rather that somebody had done…"宁愿……;更愿意……"表示过去的愿望 [例句] I'd rather you posted the letter right now. 我想让你现在去寄信。 I'd rather you were not a celebrated actor. In that case, we could spend more time together. 我到情愿你不是个知名演员,这样我们可以有更多的时间在一起。 I'd rather that I hadn't seen her yesterday. 我情愿昨天没有看到她。 句型4 It's high/about time that somebody did should do should通常不省略 …早就该…… [例句] It's time that you went to school.= It's time that you should go to school. It's high time that we did something to improve our environment. 该是我们为环保做些事情了。 I think it's high time that she made up her mind. 我想她该拿定主意了。 句型5 情态动词+动词不定式完成结构的用法 could have done "本来可以……"表示过去没有实现的可能。 might have done "本来可能……;本来应该或可以做某事"实际没有发生;含有轻微的责备语气。 should/ought to have done "本来该做某事"而实际未做 should not/ought not to have done "本来不该做"实际却做过了,含有责备语气 needn't have done "本来不必做"但是已经做过了 would rather have done "当时宁愿做了某事"实际没有做过;否定式would rather not have done表达相反意思,两者都有表示"后悔"之意。 句型6 as, though, although引导的让步状语从句。 [注意]although位于句首;though位于句首或句中;as位于句中=though。它的词序是把句中强调的形容词、副词、动词或名词放在连词前。[参考倒装结构]请注意下列句式的变化: [例句] 1. Although/Though I'm young, I already know what career I want to follow. →Young as/though I am, I already know what career I want to follow.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值