Exemplo n.º 1
0
        public void AddType(ObjectFollowData aFollowType, bool aSetOnAddition = false)
        {
            types.Add(aFollowType);

            if (aSetOnAddition)
            {
                currentType = aFollowType;
            }
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            typesMap = new Dictionary <string, ObjectFollowData>(types.Count);
            for (int i = 0; i < types.Count; i++)
            {
                typesMap[types[i].ID] = types[i];
            }

            currentType = typesMap["Default"];
        }
Exemplo n.º 3
0
        public void SetFollowType(string aID, bool aInstantChange = false)
        {
            ObjectFollowData type = null;

            if (typesMap.TryGetValue(aID, out type))
            {
                currentType = type;

                if (aInstantChange)
                {
                    ResetPosition();
                }
            }
            else
            {
                Debug.LogWarning("[CameraFollow] No type of ID: " + aID + " found");
            }
        }