Пример #1
0
        void Awake()
        {
            var trees = FindObjectsOfType <GreenPandaAssets.Scripts.Other.EnvProp>().ToList();

            for (int i = trees.Count - 1; i >= 0; i--)
            {
                if (!trees[i].name.Contains("Tree") && !trees[i].name.Contains("Rock") &&
                    !trees[i].name.Contains("Grass") && !trees[i].name.Contains("Bush") && !trees[i].name.Contains("Branch"))
                {
                    trees.Remove(trees[i]);
                }
            }

            Trees = trees.Select(x => x.transform).ToArray();

            OriginalScale = new Vector3[Trees.Length];

            for (int i = 0; i < Trees.Length; i++)
            {
                OriginalScale[i] = Trees[i].localScale;
            }

#if UNITY_EDITOR
            ServiceLocator.CheckForUniqueness <AnimatePropsService>(gameObject);
#endif
        }
Пример #2
0
        void Awake()
        {
            if (AllCheckpoints == null)
            {
                FindCheckpoints();
            }

#if UNITY_EDITOR
            ServiceLocator.CheckForUniqueness <CheckpointService>(gameObject);
#endif
        }
Пример #3
0
 private void Awake()
 {
     ServiceLocator.CheckForUniqueness <VoiceoverService>(gameObject);
 }
Пример #4
0
 private void Awake()
 {
     ServiceLocator.CheckForUniqueness <ControllerService>(gameObject);
 }