**
创建了对应的Node用getcomponent正常调用就行了
你写错了。。 用cc.instantiate
cc.instantiate(this.purplePrefab).getComponent(‘Purple’).getPurplePos();就好了
getcomponent(‘脚本名称’).方法