void Update() { /// Testing /* * if(Input.GetButtonDown("Jump")) * { * timeOffset = 1; * } * if(Input.GetButtonDown("Fire1")) * { * timeOffset = 2; * } */ if (currentNextAction == null && followerTarget.actionHistory.Count > 0) { currentNextAction = followerTarget.actionHistory[0]; // figure out what type of action it is nextActionCoroutine = StartCoroutine(Shoot((timeOffset + currentNextAction.time) - Time.time)); } }
void ClearCurrentAction() { followerTarget.actionHistory.RemoveAt(0); currentNextAction = null; }