protected override void Update()
    {
        base.Update();

        if (targetScript.GetValidTarget())
        {
            if (moneyAmount <= 0)
            {
                targetScript.SetValidTarget(false);
            }
            else if (targetScript.isTargeted)
            {
                targetScript.SetValidTarget(false);
            }
            else if (targetScript.actionInProgress)
            {
                targetScript.SetValidTarget(false);
            }
        }
        else
        {
            if (moneyAmount > 0)
            {
                if (!targetScript.actionInProgress && !targetScript.isTargeted)
                {
                    targetScript.SetValidTarget(true);
                }
            }
        }
    }
    protected override void Start()
    {
        base.Start();

        targetScript = GetComponent <HostileCitizenTarget> ();

        buildingSize = BuildingSize.Special;

        targetScript.SetValidTarget(true);
    }
Exemple #3
0
        protected override void Start()
        {
            targetScript = GetComponent <HostileCitizenTarget> ();

            base.Start();

            targetScript.SetValidTarget(true);


            GetNewTask();
        }