最佳答案
改变
function aniSprite (columnSize,framepersecond,MoveDirection)
到
function aniSprite (columnSize,framepersecond:float,MoveDirection)
发生此错误的原因是 Javascript
不知道 framepersecond
的类型为 float
,因此无法将其与另一个 相乘 float
。
您必须使用framepersecond:float
显式告诉它
关于javascript - BCE0051 : Operator '*' cannot be used with a left hand side of type 'float' and a right hand side of type 'Object' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36313631/