public void ProcessData(AIDataObject data) { if (m_CurrentState != BehaviourState.Circling) { return; } if (Input.GetKey(KeyCode.Space)) { transform.position = GetNextPosition(m_Rad, m_Angle); m_Angle++; if (m_Angle > 360f) { m_Angle -= 360f; } } }
public void ProcessData(AIDataObject data) { if (data.DistanceFromPlayer <= 5) { m_CurrentTime += Time.deltaTime; if (m_CurrentTime >= m_AttackTime) { var randomTime = m_Random.RandomFloat(MinimumAttackTime, MaximumAttackTime); m_EnemyAI.RegisterExecutionRequest(this, randomTime); m_CurrentTime = 0f; } } else { m_EnemyAI.UnregisterExecutionRequest(this); m_CurrentTime = 0; } }