public void notify(StateOfActor state, int pos, GameObject actor) { if (updatelist != null) { updatelist(state, pos, actor); } }
public void notified(StateOfActor state, int pos, GameObject actor) { if (state == StateOfActor.ENTER_AREA) { //分数加1 } else { //失败 } }
public void notified(StateOfActor state, int pos, GameObject actor) { if (state == StateOfActor.ENTER_AREA) { if (pos == this.gameObject.name[this.gameObject.name.Length - 1] - '0') { getGoal(actor); } // 如果进入自己的区域,进行追击 else { loseGoal(); } // 如果离开自己的区域,放弃追击 } else { stop(); } // 角色死亡,结束动作 }