protected override void OnCollisionBegin(Collider_ other) { var c = 0; var k = other.GetInstanceID(); if (m_cols.TryGetValue(k, out c)) { m_cols[k] = c + 1; } else { m_cols.Add(k, 1); } #region Debug log #if (DEVELOPMENT_BUILD || UNITY_EDITOR) && DETAIL_BATTLE_LOG if (creature) { Logger.LogWarning("[{2}:{3}-{4}], Creature {0} attack box collision begin with [{1}]", creature.name, m_cols[k], Level.levelTime, creature.frameTime, creature.frameCount); } #endif #if AI_LOG Module_AI.LogBattleMsg(creature, "[attack box collision begin with {0}]", m_cols[k]); #endif #endregion }
public int AttackedCount(Collider_ other) { return(m_cols.Get(other.GetInstanceID())); }