Cocoa touch 预期的标识符错误?
嗨,所以我试图创建一个if语句,其中…如果精灵被触摸了…那么会发生一些事情 然而,由于某种原因,我得到了一个预期的识别错误,我一辈子都不知道为什么 感谢您提供的帮助和知识Cocoa touch 预期的标识符错误?,cocoa-touch,input,identifier,Cocoa Touch,Input,Identifier,嗨,所以我试图创建一个if语句,其中…如果精灵被触摸了…那么会发生一些事情 然而,由于某种原因,我得到了一个预期的识别错误,我一辈子都不知道为什么 感谢您提供的帮助和知识meKKInput*input=[KKInput sharedInput] KKInput* input = [KKInput sharedInput]; if([input isAnyTouchOnNode:kan touchPhase:[KKTouchPhaseAny]]) { for ( int
meKKInput*input=[KKInput sharedInput]代码>
KKInput* input = [KKInput sharedInput];
if([input isAnyTouchOnNode:kan touchPhase:[KKTouchPhaseAny]])
{
for ( int x = 105.0f; x < 100000 ; ++x)
{
for ( int y = 50.0f; y < 100000 ; ++y)
{
kan.position = CGPointMake((x),(y));
}
}
}
KKInput*input=[KKInput sharedInput];
如果([input isAnyTouchOnNode:kan touchPhase:[KKTouchPhaseAny]])
{
对于(整数x=105.0f;x<100000;++x)
{
对于(整数y=50.0f;y<100000;++y)
{
kan.position=CGPointMake((x)、(y));
}
}
}
必须删除KKTouchPhaseAny周围的方括号(可能是一个枚举)。请在问题本身中也提到这个错误。是我做的吗?预期的标识符错误?