我有一个set函数
public function set energy(value:int):void当我尝试从同一个类中调用这个函数时
energy(10); or this.energy(10)我得到一个错误:
Call to a possibly undefined method energy.在类中没有声明为能源的变量。有什么线索吗?
发布于 2012-01-03 23:16:51
它是一个property setter,所以你可以这样调用它:
this.energy = 10;
https://stackoverflow.com/questions/8714364
复制相似问题