Example #1
0
    private bool isPlayerNearSign = false; //is player near sign

    private void Start()
    {
        taskManagement = FindObjectOfType <TaskManagement>();                                     //get taskmanagement
        announcer      = GameObject.FindGameObjectWithTag("HUD_Announcer").GetComponent <Text>(); //get hud announcer

        if (taskInfo.task != string.Empty &&
            (taskManagement.IsTaskAdded(taskManagement.currentTasks, taskInfo.taskID) >= 0 ||
             taskManagement.IsTaskAdded(taskManagement.completedTasks, taskInfo.taskID) >= 0)) //if task added/completed
        {
            image.enabled = false;                                                             //hide task image
        }
    }