Ejemplo n.º 1
0
 public void Initialize(WaypointManager waypointManager, PurseManager purseManager)
 {
     this.waypointManager = waypointManager;
     this.purseManager    = purseManager;
     GetNextWaypoint();
     transform.position = currentDestination.transform.position; // Move to WP0
     GetNextWaypoint();
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (Instance)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Ejemplo n.º 3
0
    void Start()
    {
        purse         = GameObject.Find("PurseManager").GetComponent <PurseManager>();
        buttonRestart = GameObject.Find("Restart");

        death         = GameObject.Find("death");
        deathSound    = death.GetComponent <AudioSource>();
        healthPerUnit = 100f / health;

        myPathThroughLife  = route.path;
        transform.position = myPathThroughLife[index].transform.position;
        Recalculate();
    }
Ejemplo n.º 4
0
 void Start()
 {
     myPurse = GameObject.FindGameObjectWithTag("Purse").GetComponent <PurseManager>();
 }