Beispiel #1
0
    public void HasReachedTarget(GameObject target)
    {
        //Debug.Log("HasReachedTarget()");
        ActionText.text = "Has Reached " + target.name;
        timeAtLocation  = 0;

        if (returnHome)
        {
            Debug.Log("Received exp");
            myExp.AddExp();
            UpdateExpUI();
            returnHome = false;
        }
        else
        {
            returnHome = true;
        }

        movingToTarget = false;
        currentTarget  = null;
        pathToTarget   = null;
        StopCoroutine(MovingTowardsTarget);
        StartCoroutine(PerformTask(target.tag, target));
    }
Beispiel #2
0
 public static void AddExp(int exp)
 {
     Store.exp += exp;
     Experience.AddExp(exp);
 }