Ejemplo n.º 1
0
 public override bool SetComponentData(UrbComponentData Data)
 {
     GoalTag         = UrbEncoder.GetEnum <UrbScentTag>("GoalTag", Data);
     PassableTerrain = UrbEncoder.GetEnum <UrbPathTerrain>("PassableTerrain", Data);
     Size            = (int)UrbEncoder.GetField("Size", Data);
     return(true);
 }
Ejemplo n.º 2
0
 public void SetNewMap(int newX, int newY, float newTileSize, UrbPathTerrain TerrainType = UrbPathTerrain.Land)
 {
     ClearMap();
     TileSize       = newTileSize;
     Xsize          = newX;
     Ysize          = newY;
     DefaultTerrain = TerrainType;
     GenerateMap();
 }
Ejemplo n.º 3
0
    public bool TerrainPassable(UrbPathTerrain Input)
    {
        bool Passable = false;

        for (int tt = 0; tt < TerrainTypes.Length; tt++)
        {
            if (Input == TerrainTypes[tt])
            {
                Passable = true;
                break;
            }
        }
        return(Passable);
    }
Ejemplo n.º 4
0
    public override bool SetComponentData(UrbComponentData Data)
    {
        MateRequirement        = (int)UrbEncoder.GetField("MateRequirement", Data);
        MateCrowding           = (int)UrbEncoder.GetField("MateCrowding", Data);
        OffspringCount         = (int)UrbEncoder.GetField("OffspringCount", Data);
        OffspringRequiredSpace = UrbEncoder.GetField("OffspringRequiredSpace", Data);

        DispersalDistance = (int)UrbEncoder.GetField("DispersalDistance", Data);
        Gestation         = UrbEncoder.GetField("Gestation", Data);
        Gestating         = (UrbEncoder.GetField("Gestating", Data) > 0.0f);

        BreedType = UrbEncoder.GetEnum <UrbBreedTag>("BreedType", Data);
        RequiredOffspringTerrain = UrbEncoder.GetEnum <UrbPathTerrain>("RequiredOffspringTerrain", Data);
        OffspringData            = UrbEncoder.GetObjectDataArray("OffspringData", Data);

        MateScents  = UrbEncoder.GetEnumArray <UrbScentTag>("MateScents", Data);
        RivalScents = UrbEncoder.GetEnumArray <UrbScentTag>("RivalScents", Data);

        GestationRecipe = UrbEncoder.GetSubstancesFromArray("GestationRecipe", Data);

        return(true);
    }