Exemple #1
0
 void Start()
 {
     path = SingletonPath.Instance;
     if (isBlueCar)
     {
         targetPosition = path.getBluePoint(isPathSwitched);
     }
     else
     {
         targetPosition = path.getRedPoint(isPathSwitched);
     }
 }
Exemple #2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         //DontDestroyOnLoad(gameObject);
     }
     else
     {
         //Sahne değişiminde oluşacak olan kopya nesneyi yok eder.
         Destroy(gameObject);
     }
 }