Exemple #1
0
 /// <summary>
 /// Constructor for the turret object. Saves only the important fields of the BuildingConstructor script attached to the building.
 /// </summary>
 /// <param name="bc">Bc.</param>
 public Turret(BuildingController bc)
 {
     name = bc.getBuilding().getName();
     x = bc.gameObject.transform.position.x;
     y = bc.gameObject.transform.position.y;
     z = bc.gameObject.transform.position.z;
     wRot = bc.gameObject.transform.rotation.w;
     xRot = bc.gameObject.transform.rotation.x;
     yRot = bc.gameObject.transform.rotation.y;
     zRot = bc.gameObject.transform.rotation.z;
     timeTillNextAttack = bc.timeToNextAttack;
     timeTillNext = bc.timeInterval;
 }