protected virtual void Attack(CombatUnit enemyUnit) { if (enemyUnit.GetCurrentState() != State.Dead && Time.time > m_nextAttack) { m_nextAttack = Time.time + m_attackSpeed; enemyUnit.TakeDamage(m_attackDamage, m_unitController.GetPlayerNumber()); } }
protected override void Attack(CombatUnit enemyUnit) { if (enemyUnit.GetCurrentState() != State.Dead && Time.time > m_nextAttack) { m_nextAttack = Time.time + m_attackSpeed; enemyUnit.TakeDamage(m_attackDamage, PlayerEntity.Player.Neutre); } }
protected override void Attack(CombatUnit enemyUnit) { if (enemyUnit.GetCurrentState() != State.Dead && Time.time > m_nextAttack) { m_nextAttack = Time.time + m_attackSpeed; enemyUnit.TakeDamage(m_attackDamage, m_unitController.GetPlayerNumber()); RpcShootProjectile(enemyUnit.gameObject); } }
private void CheckOwnershipForOwnerUnit(UnitController unit) { CombatUnit combatUnit = unit.GetComponent <CombatUnit>(); if (GetCheckpointOpen(m_playerOwner) && m_stockUnits.transform.childCount < m_maxStockNumber && combatUnit.GetUnitType() != CombatUnit.UnitType.GiantGolem && combatUnit.GetUnitType() != CombatUnit.UnitType.MediumGolem && CombatUnit.State.NotInFight == combatUnit.GetCurrentState() && unit.GetCheckpointState() != UnitController.EUnitCheckpointState.bannedFromStock) { AddToStockUnits(unit); return; } else { unit.transform.SetParent(m_friendsUnits.transform); } }