Example #1
0
 // clears the party and loads a new random party.
 public void generateParty(oldGrid _g, GameObject _player, int _num)
 {
     // start from scratch
     // TODO: Cleanup/reset
     charList.Clear();
     // prep the name list
     loadNames();
     // create character
     for (int i = 0; i < _num; i++)
     {
         // make a character
         oldCharacter temp = new oldCharacter();
         // give it stats
         temp.initializeRandom();
         // put it somewhere
         temp.worldPos = _g.getRandomTilePos();
         // give it a mesh
         GameObject newP = Instantiate(_player, temp.worldPos, Quaternion.identity);
         // give it a name
         newP.name = getRandomName();
         // assign relations
         newP.GetComponent <oldCharacter>().initializeCopy(temp);
         newP.GetComponent <oldCharacter>().setCharMesh(newP);
         newP.transform.SetParent(this.transform);
         // put it in the list
         charList.Add(newP.GetComponent <oldCharacter>());
     }
     // initiative
     // TODO: abstract
     charList.Sort(SortBySpeed);
 }
Example #2
0
 void Start()
 {
     // Required components
     partyObj    = GetComponent <Party>();
     gridObj     = GetComponent <oldGrid>();
     shoulderCam = GetComponent <shoulderCamScript>();
     godCam      = GetComponent <godCamScript>();
     godCam.cam  = mainCamera;
     godCam.cam.transform.Rotate(new Vector3(45, 0, 0));
     shoulderCam.cam = mainCamera;
 }