Пример #1
0
 public Desire(DesireType _type, float _incSpeed)
 {
     value        = 0;
     type         = _type;
     name         = type.ToString();
     incSpeed     = _incSpeed;
     incSpeedMult = 0.1f;
 }
Пример #2
0
 public Desire()
 {
     value        = 0;
     type         = DesireType.none;
     name         = type.ToString();
     incSpeed     = 1;
     incSpeedMult = 0.1f;
 }
Пример #3
0
    private DesireType getDesireTypeToAddress()
    {
        LinkedList <Desire>     desiresSorted = getDesireSortedList();
        LinkedListNode <Desire> desireNode    = desiresSorted.First;

        while (desireNode != null)
        {
            DesireType        type         = desireNode.Value.GetDesireType();
            List <RoomObject> objsToTarget = getRoomObjectsToTarget(type);
            if (objsToTarget.Count > 0)
            {
                return(type);
            }
            else
            {
                Debug.Log("Could not address desire: " + type.ToString());
                desireNode = desireNode.Next;
            }
        }
        return(DesireType.none);
    }