示例#1
0
    public void Setup(FlockControl.BirdState bs, int number, int numBirds, int numWalls)
    {
        this.flockControl = FindObjectOfType <FlockControl>();
        this.statsControl = FindObjectOfType <StatsControl>();
        this.velocity     = Vector2.zero;
        this.force        = Vector2.zero;

        this.transform.localScale = defaultScale * bs.size;
        this.speed = bs.speed;
        this.size  = bs.size;
        this.mass  = bs.size * bs.size;
        gameObject.GetComponent <Renderer>().material.color = bs.color;
        this.velocity = bs.velocity;

        this.number  = number;
        this.lastPos = transform.position;
        gameObject.GetComponent <Collider2D>().enabled = true;
        birdDeltas     = new CachedDelta[numBirds];
        wallDeltas     = new CachedDelta[numWalls];
        countCollision = false;
    }
示例#2
0
	public void Setup(FlockControl fc) {
		this.fc = fc;
		
	}
示例#3
0
 public void Setup(FlockControl fc)
 {
     this.fc = fc;
 }