// Use this for initialization void Start() { gameOverButtonText.SetActive(false); firstPoint = GameObject.FindGameObjectWithTag("Waypoints").GetComponent <WaypointHolder>(); spawnPosition = firstPoint.waypoints[0].position; UpdateLives(0); MoneyWithdrawlOrDeposit(0); }
// Use this for initialization void Start() { Path = GameObject.Find("WP Holder"); wayIndex = 0; pathScript = Path.GetComponent <WaypointHolder>(); agent = GetComponent <UnityEngine.AI.NavMeshAgent> (); StartMove(); Spawner = GameObject.Find("SpawnerObj"); }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindGameObjectWithTag("GameController"); gameController = gameControllerObject.GetComponent <GameController>(); if (gameController == null) { Debug.Log("Could not find 'GameController' scipt"); } Wpoints = GameObject.FindGameObjectWithTag("Waypoints").GetComponent <WaypointHolder>(); //This didn't do anything: Physics2D.IgnoreLayerCollision(0, 15); transform.position = Wpoints.waypoints[0].position; }
void Start() { waypointHolder = GameObject.Find("WaypointHolder").GetComponent <WaypointHolder> (); }
public void Start() { wph = GetComponentInParent <WaypointHolder> (); }