public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Completed, SSActiontargetPositionType intParam = SSActiontargetPositionType.Normal, string strParam = null, object objParam = null) { //若是正常模式下就随机巡逻 if (intParam == SSActiontargetPositionType.Normal) { moveRandomly(source.gameObject, true); } //否则就追逐玩家 else { moveToPlayer(source.gameObject); } }
public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Completed, SSActiontargetPositionType intParam = SSActiontargetPositionType.Normal, string strParam = null, object objParam = null) { source.destroy = false; this.start++; if (this.start >= sequence.Count) { this.start = 0; if (repeat > 0) { repeat--; } if (repeat == 0) { this.destroy = true; this.callBack.SSActionEvent(this); } } }