//动作结束后 public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Completed, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, object objParam = null) { if (intParam == SSActionTargetType.Normal) { addRandomMovement(source.gameObject, true); } else { addDirectMovement(source.gameObject); } }
//动作结束后选择添加巡逻动作或者追捕英雄动作 public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Competeted, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, Object objParam = null) { //如果当前是巡逻,则添加巡逻,否则添加抓捕 if (intParam == SSActionTargetType.Normal) { addRandomMovement(source.gameobject, true); } else { addDirectMovement(source.gameobject); } }
//提供给子动作回调,提醒动作序列执行下一个子动作 public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Completed, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, object objParam = null) { source.destroy = false; this.subActionIndex++; if (this.subActionIndex >= actionList.Count) { this.subActionIndex = 0; if (repeatTimes > 0) { repeatTimes--; } if (repeatTimes == 0) { this.destroy = true; this.callBack.SSActionEvent(this); } } }
//提供给子动作回调,提醒动作序列执行下一个动作,如果序列动作完成,通知该动作的动作管理者 public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Competeted, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, Object objParam = null) { source.destory = false; this.subActionIndex++;//执行下一个动作 //执行完整个序列,判断是否循环 if (this.subActionIndex >= actionList.Count) { this.subActionIndex = 0;//将下标重置0 if (repeatTimes > 0) { repeatTimes--;//循环次数减少 } if (repeatTimes == 0) { this.destory = true; this.callback.SSActionEvent(this);//序列动作完成,通知该动作管理者 } } }
public void SSActionEvent(SSAction source, SSActionEventType events = SSActionEventType.Completed, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, Object objectParam = 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); } } }
public void SSActionEvent(SSAction source, SSActionEventType eventType = SSActionEventType.Completed, SSActionTargetType intParam = SSActionTargetType.Normal, string strParam = null, object objParam = null) { //throw new NotImplementedException(); }