Esempio n. 1
0
    public void removeSighting(LabelHandle target, Vector3 position, Vector3?direction)
    {
        if (targetSightings.ContainsKey(target))
        {
            SensoryInfo info = targetSightings[target];

            info.removeSighting();
            if (info.getSightings() < 1)
            {
                notifyListenersTargetLost(target);
            }
            info.updatePosition(position);
            info.updateTime(System.DateTime.Now);
        }
        else
        {
            //Realistically we should never get here. This case is stupid.
            targetSightings[target] = new SensoryInfo(position, direction, System.DateTime.Now, 0);
            notifyListenersTargetLost(target);
            Debug.LogWarning("Target '" + target.getName() + "' that was never found has been lost. Shenanigans?");
        }
    }