当我在游戏中达到这一点时,屏幕不断刷新

Posted

技术标签:

【中文标题】当我在游戏中达到这一点时,屏幕不断刷新【英文标题】:screen refreshing constantly when i get to this point in my game 【发布时间】:2019-04-03 20:58:21 【问题描述】:

在我的游戏“黑暗/失落的森林”中,我正在处理可以获得盟友和/或武器的部分,但是当我进入该区域时,文本不断刷新,我无法输入任何命令

我尝试将check_1% 强制设置为1,但这没有用

smithery:

CLS

Saythis "As you walk into the smithery you notice swords, axes, hammers and tools used for forging are lining the walls, some newer than others but none of them have rusted or gone uncleaned, smith must care about his works, you also smell coals burning as you notice smith is flattening a rod of hot iron which looks like a sword,"
IF check_1% = 1 THEN PRINT "(1) Hello Smith, are the weapons I requested done?" ELSE PRINT "(1) Hello Smith, I would like to buy some weapons"
IF check_1% = 1 THEN PRINT "(2) Hello Smith, I would like to buy some weapons." ELSE PRINT "(2) Hello Smith, I would like to requst you to make some weapons."
PRINT "(3) Hey Smith, do you wanna joinme in my adventure?"
PRINT ""
PRINT "what will you do/say?"

SELECT CASE smithery$

    CASE "1"
        IF check_1% = 1 GOTO smithery1a ELSE GOTO smithery1b
    CASE "2"
        GOTO smithery2a
    CASE "3"
        GOTO smithery3a
    CASE ELSE
        GOTO smithery

END SELECT

我希望它做的不是像疯子一样刷新屏幕

我记得为什么会这样,我没有添加input

smithery:

CLS

Saythis "As you walk into the smithery you notice swords, axes, hammers and tools used for forging are lining the walls, some newer than others but none of them have rusted or gone uncleaned, smith must care about his works, you also smell coals burning as you notice smith is flattening a rod of hot iron which looks like a sword,"
IF check_1% = 1 THEN PRINT "(1) Hello Smith, are the weapons I requested done?" ELSE PRINT "(1) Hello Smith, I would like to buy some weapons"
IF check_1% = 1 THEN PRINT "(2) Hello Smith, I would like to buy some weapons." ELSE PRINT "(2) Hello Smith, I would like to requst you to make some weapons."
PRINT "(3) Hey Smith, do you wanna joinme in my adventure?"
PRINT ""
INPUT "what will you do/say?", smithery$

SELECT CASE smithery$

    CASE "1"
        IF check_1% = 1 GOTO smithery1a ELSE GOTO smithery1b
    CASE "2"
        GOTO smithery2a
    CASE "3"
        GOTO smithery3a
    CASE ELSE
        GOTO smithery

END SELECT

【问题讨论】:

所以我忘了加input所以我去看看是否可行 你能更新你的帖子来描述这些变化吗? 对不起,我不常来这里查看回复,我会更新它 【参考方案1】:

添加input 有效,我通常忘记添加

【讨论】:

以上是关于当我在游戏中达到这一点时,屏幕不断刷新的主要内容,如果未能解决你的问题,请参考以下文章

将 CADisplayLink 添加到 Cocos2D

游戏的构成

在 MySQL 中达到平均水平

试图从存储卡问题中删除一个类

离线游戏中心 iOS 成就

在 Unity 2d 中使用坐标系和游戏屏幕?