Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     gameOverButtonText.SetActive(false);
     firstPoint    = GameObject.FindGameObjectWithTag("Waypoints").GetComponent <WaypointHolder>();
     spawnPosition = firstPoint.waypoints[0].position;
     UpdateLives(0);
     MoneyWithdrawlOrDeposit(0);
 }
Beispiel #2
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");
 }
Beispiel #3
0
    // 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;
    }
Beispiel #4
0
 void Start()
 {
     waypointHolder = GameObject.Find("WaypointHolder").GetComponent <WaypointHolder> ();
 }
Beispiel #5
0
 public void Start()
 {
     wph = GetComponentInParent <WaypointHolder> ();
 }