예제 #1
0
        public void Setup(IAgentData interfacer)
        {
            gameObject.SetActive(true);
            LoadComponents();

            GameObject.DontDestroyOnLoad(gameObject);

            setupAbilitys.FastClear();

            MyAgentCode  = interfacer.Name;
            Data         = interfacer;
            SpawnVersion = 1;
            CheckCasting = true;

            Influencer = new LSInfluencer();
            if (_visualCenter == null)
            {
                _visualCenter = CachedTransform;
            }

            if (Animator.IsNotNull())
            {
                Animator.Setup();
            }


            abilityManager.Setup(this);
            Ringer = RingController.Create();
            if (Ringer.IsNotNull())
            {
                Ringer.Setup(this);
            }

            Influencer.Setup(this);
            Body.Setup(this);

            SelectionRadiusSquared = _selectionRadius * _selectionRadius;
            if (StatsBarer != null)
            {
                StatsBarer.Setup(this);
            }

            this.RegisterLockstep();
        }
예제 #2
0
        public void Setup(IAgentData interfacer)
        {
            gameObject.SetActive(true);
            LoadComponents();

            GameObject.DontDestroyOnLoad(gameObject);

            setupAbilitys.FastClear();

            MyAgentCode  = interfacer.Name;
            Data         = interfacer;
            SpawnVersion = 1;
            CheckCasting = true;

            Influencer = new LSInfluencer();
            if (_visualCenter == null)
            {
                _visualCenter = CachedTransform;
            }

            if (Animator.IsNotNull())
            {
                Animator.Setup();
            }

            Body = UnityBody.InternalBody;
            Body.Setup(this);
            abilityManager.Setup(this);


            Influencer.Setup(this);



            SelectionRadiusSquared = SelectionRadius * SelectionRadius;

            this.RegisterLockstep();

            Setuped = true;
        }