Esempio n. 1
0
        public void EnableAiScript(string in_scriptName)
        {
            _RotateRight = GetComponent <RotateRight>();
            _RotateLeft  = GetComponent <RotateLeft>();

            if (in_scriptName.Equals("Right", StringComparison.InvariantCultureIgnoreCase) && _RotateRight != null)
            {
                _RotateRight.enabled = true;
                _RotateRight.Speed   = Speed;
            }
            if (in_scriptName.Equals("Left", StringComparison.InvariantCultureIgnoreCase) && _RotateLeft != null)
            {
                _RotateLeft.enabled = true;
                _RotateLeft.Speed   = Speed;
            }
        }
Esempio n. 2
0
        public void EnableAiScript(string in_scriptName)
        {
            _RotateRight = GetComponent<RotateRight>();
            _RotateLeft = GetComponent<RotateLeft>();

            if (in_scriptName.Equals("Right", StringComparison.InvariantCultureIgnoreCase) && _RotateRight != null)
            {
                _RotateRight.enabled = true;
                _RotateRight.Speed = Speed;
            }
            if (in_scriptName.Equals("Left", StringComparison.InvariantCultureIgnoreCase) && _RotateLeft != null)
            {
                _RotateLeft.enabled = true;
                _RotateLeft.Speed = Speed;
            }

        }