Beispiel #1
0
        public void Initialize(IActorQueue actTarget, List <string> weightName, List <int> weightValue)
        {
            if (actTarget == null)
            {
                throw new UnityException("Act Target is null.");
            }

            this.ActTarget = actTarget;

            for (int i = 0; i < weightName.Count; ++i)
            {
                var pair = new StringIntPair();

                pair.key = weightName[i];

                if (weightValue.Count > i)
                {
                    pair.value = weightValue[i];
                }

                SetWeight(pair);
            }

            this.Reset();
        }
Beispiel #2
0
        public void Initialize(IActorQueue actTarget, List <StringIntPair> weights)
        {
            if (actTarget == null)
            {
                throw new UnityException("Act Target is null.");
            }

            this.ActTarget = actTarget;

            foreach (var actorWeight in weights)
            {
                SetWeight(actorWeight);
            }

            this.Reset();
        }