/// <summary>
 /// Gets reference to itself and to whatever it needs to interact with, then sends the clicked message
 /// </summary>
 private void Awake()
 {
     myself    = GetComponent <Button>();
     roadSpawn = FindObjectOfType <RoadSpawn>();
     myself.onClick.AddListener(Clicked);
 }
Beispiel #2
0
 // Use this for initialization
 void Awake()
 {
     grid            = FindObjectOfType <GridProperties>();
     roadSpawn       = FindObjectOfType <RoadSpawn>();
     rotate90Degrees = Quaternion.Euler(0, 90, 0);
 }
Beispiel #3
0
 public void setSpawnRef(RoadSpawn inSpawn)
 {
     mySpawnRef = inSpawn;
 }
Beispiel #4
0
 // Start is called before the first frame update
 void Start()
 {
     roadSpawner   = GetComponent <RoadSpawn>();
     obstacleSpawn = GetComponent <ObstacleSpawner>();
 }
 private void Awake()
 {
     grid      = FindObjectOfType <GridProperties>();
     roadSpawn = FindObjectOfType <RoadSpawn>();
 }