private void Update() { if (!aiActive || Time.time < m_LastDecision + m_DecisionFrequency) { return; } m_LastDecision = Time.time; BeforeUpdated?.Invoke(); m_CurrentMeme.UpdateState(this); }
private void Update() { if (!aiActive || Time.time < _lastDecision + _decisionFrequency / Time.timeScale) { return; } _lastDecision = Time.time; BeforeUpdated?.Invoke(); _currentMeme.UpdateState(this); // TODO: nullref here sometime }
public void Delete(TEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } if (entity.Id < 1) { throw new ArgumentOutOfRangeException("id < 1"); } BeforeUpdated?.Invoke(entity); entity.IsDel = true; _context.Entry(entity).State = EntityState.Modified; }