예제 #1
0
 //Appelée uniquement par le Master
 public void InitializeTile(int _style, MapGenerator.strategic _stratElt, int foodIncome, int goldIncome, int strategicIncome)
 {
     tileName             = gameObject.name;
     tileObject           = gameObject;
     position             = tileObject.transform.position;
     style                = _style;
     stratElt             = _stratElt;
     this.foodIncome      = foodIncome;
     this.goldIncome      = goldIncome;
     this.strategicIncome = strategicIncome;
 }
예제 #2
0
 //Initialisation chez le client
 public void OnPhotonInstantiate(PhotonMessageInfo info)
 {
     object[] instantiationData = info.photonView.InstantiationData;
     style                = (int)instantiationData[0];
     tileName             = (string)instantiationData[1];
     stratElt             = stringToStratElt((string)instantiationData[2]);
     tileObject           = this.gameObject;
     position             = tileObject.transform.position;
     tileObject.name      = tileName;
     this.controller      = (string)instantiationData[3];
     this.foodIncome      = (int)instantiationData[4];
     this.goldIncome      = (int)instantiationData[5];
     this.strategicIncome = (int)instantiationData[6];
     neighboursName       = new List <string>();
     for (int i = 7; i < instantiationData.Length; i++)
     {
         string tileName = (string)instantiationData[i];
         neighboursName.Add((string)instantiationData[i]);
     }
 }