Ejemplo n.º 1
0
        public bool AssignIndexToObject(InfiniteObject obj, int index)
        {
            if (targetObject == null)
            {
                return(false);
            }

            if (obj == targetObject)
            {
                targetObjectIndex   = index;
                targetObjectIsScene = targetObject.GetObjectType() == ObjectType.Scene;
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public virtual void Init()
        {
            infiniteObjectHistory = InfiniteObjectHistory.instance;
            thisInfiniteObject    = GetComponent <InfiniteObject>();

            ObjectType objectType = thisInfiniteObject.GetObjectType();

            for (int i = 0; i < avoidObjectRuleMaps.Count; ++i)
            {
                avoidObjectRuleMaps[i].Init(infiniteObjectHistory, objectType);
            }

            for (int i = 0; i < probabilityAdjustmentMaps.Count; ++i)
            {
                probabilityAdjustmentMaps[i].Init(infiniteObjectHistory, objectType);
            }
        }