Example #1
0
        public void Init()
        {
            if (effects == null)
            {
                effects = gameObject.AddComponent <EffectsShepherd>();
                effects.Init();
            }

            controller = AddControllerOfType(DesiredController);
            controller.Init(effects);
            controller.SetMaxVelocity(100f);

            detectionRadius = gameObject.AddComponent <DetectionRadius>();
            detectionRadius.Init(10);
        }
Example #2
0
        public void Init()
        {
            if (effects == null)
            {
                effects = gameObject.AddComponent <EffectsShepherd>();
                effects.Init();
            }

#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBGL
            _desiredController = Controller.Keyboard;
#endif
            ControllerInstance = AddControllerOfType(_desiredController);
            ControllerInstance.Init(effects);
            ControllerInstance.SetMaxVelocity(150f);

            detectionRadius = gameObject.AddComponent <DetectionRadius>();
            detectionRadius.Init(10);
        }