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; }
public void Setup(FlockControl fc) { this.fc = fc; }