Example #1
0
    public FlockFormation(List<Vector3> vertices)
    {
        formationManagers = new Dictionary<Entity, FormationManager>();

        updateTimer = new System.Diagnostics.Stopwatch();

        var pattern = new ModelFormation(null, vertices);
        var formationManager = new FormationManager(pattern);
        generalManager = formationManager;
    }
Example #2
0
 void Awake()
 {
     INSTANCE = this;
 }
Example #3
0
    Steering getDefaultSteering(Entry e, FormationManager generalManager, Flock flock)
    {
        var pattSteering = new PatternSteering(e.bird, generalManager);
        var separation = new Separation(e.bird, flock, 5.0f, -1f);
        separation.aknnApproxVal = 1.0;
        var obstacleAvoidance = new ObstacleAvoidance(e.bird, 20f, new string[]{"Ground"});

        var blended = new BlendedSteering[3];

        blended[0] = new BlendedSteering(e.bird, new BehaviorAndWeight(obstacleAvoidance, 1f));
        blended[1] = new BlendedSteering(e.bird, new BehaviorAndWeight(separation, 1f));
        blended[2] = new BlendedSteering(e.bird, new BehaviorAndWeight(pattSteering, 1f));

        return new PrioritySteering(1f, blended);
    }
	public void setup()
	{
		formationManager = new FormationManager();
	}