private int typeOfWormie; // the type of wormie, according to it's length void Awake() { typeOfWormie = FindWormieType(); // find the type of the wormie lengthOfWormie = (typeOfWormie + 1) * 10; // find the legnth of the wormie _pos = transform.position; // assign a value to it's position thisWormie = new Wormie(typeOfWormie, lengthOfWormie, _pos, resistanceFactor, FindRotationType()); // use our construct to make an object of every single wormie }
void Update() { thisWormie = new Wormie(typeOfWormie, lengthOfWormie, _pos, resistanceFactor, FindRotationType()); // update the state of this wormie frame, by frame }