Ejemplo n.º 1
0
    public void MergeFrom(Agent from, MemoryType type, float percent = 1)
    {
        switch (type)
        {
        case MemoryType.Obstacles: Obstacles.MergeFrom(from.Memory.Obstacles, percent); break;

        case MemoryType.Creatures: Creatures.MergeFrom(from.Memory.Creatures, percent); break;

        case MemoryType.Meals: Meals.MergeFrom(from.Memory.Meals, percent); break;

        case MemoryType.Foods: Foods.MergeFrom(from.Memory.Foods, percent); break;

        case MemoryType.FoodSources: FoodSources.MergeFrom(from.Memory.FoodSources, percent); break;

        case MemoryType.Nests: Nests.MergeFrom(from.Memory.Nests, percent); break;

        case MemoryType.Communications: Communications.MergeFrom(from.Memory.Communications, percent); break;

        case MemoryType.Species: Species.MergeFrom(from.Memory.Species, percent); break;
        }
    }