Beispiel #1
0
    public void SpawnUnitEntity(string id, string name, Vector3Int position)
    {
        UnitEntityData       unitData   = GlobalUnitEntityDictionary.GetUnitEntityData("Unit Entities", id); // This might be too tightly coupled to Unity?
        UnitEntityCombatData combatData = UnitEntityCombatData.LoadFromSO(unitData);
        UnitEntity           unitEntity = new UnitEntity(name, position, unitData.maxHealth, unitData.sight, unitData.isPlayerControlled, unitData.movementSpeed, World, combatData);

        OnUnitSpawn?.Invoke(unitEntity, id);
    }