今天下午終於搞掂了unit auto moving
auto detect enemy 也ok
現在的問題是其他alternative,比如說當旁邊有盟存怎辦?
那個if 的括括將會挺大的..
讓我想想:
case1: 旁邊是盟友 (或block)
case2: unit是馬
case3: 準備attack
case4: 原來的enemy死了/distance增了
還有很多可能性..
case5: 弓準備attack
這基本搞店後就是defense狀態的處理
想到了
馬的寫法就是, if unit=horse, then loop unit move again
這個行
現在搞原來的enemy死了吧
應該在最開始搞
沒有留言:
張貼留言