示例#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);
        }
        else
        {
            //Realistically we should never get here. This case is stupid.
            targetSightings[target] = new SensoryInfo(position, direction, 0);
            notifyListenersTargetLost(target);
            Debug.LogWarning("Target '" + target.getName() + "' that was never found has been lost. Shenanigans?");
        }
    }