using UnityEngine;
using System.Collections;
namespace Gaia
{
public class SpawnRuleExtension : MonoBehaviour
{
///
/// Initialise the extension
///
public virtual void Initialise()
{
}
///
/// Whether or not this extension impacts textures
///
///
public virtual bool AffectsTextures()
{
return false;
}
///
/// Whether or not this extension impacts details
///
///
public virtual bool AffectsDetails()
{
return false;
}
///
/// Call this to update fitness of the location spawnInfo passed in
///
/// Use this to get details about the location and update the fitness
/// Return the fitness of the location
public virtual float GetFitness(float fitness, ref SpawnInfo spawnInfo)
{
return fitness;
}
///
/// Whether or not this extension should override the spawn itself
///
///
///
public virtual bool OverridesSpawn(SpawnRule spawnRule, ref SpawnInfo spawnInfo)
{
return false;
}
///
/// Spawn an instance at the location provided.
///
///
///
public virtual void Spawn(SpawnRule spawnRule, ref SpawnInfo spawnInfo)
{
}
///
/// Call this to do any post spawn goodness
///
public virtual void PostSpawn(SpawnRule spawnRule, ref SpawnInfo spawnInfo)
{
}
}
}