void OnEnable()
 {
     //Store a reference to the AI Controller script
     character          = (BasicAIController)target;
     guiStyle.fontSize  = 14;
     guiStyle.fontStyle = FontStyle.Bold;
 }
 // Start is called before the first frame update
 void Start()
 {
     dummy = new HRCollector();
     dummy.Connect();
     dummy.StartCollecting();
     enemy_control = enemy.GetComponent <ViridaxGameStudios.AI.BasicAIController>();
     detectRad     = enemy_control.m_DetectionRadius;
     //startSpeed = enemy_control.MovementSpeed;
 }
Exemple #3
0
        static void AttachAIControllerScript(GameObject obj)
        {
            //Assign AI Script to the GameObject
            BasicAIController AIscript = null;

            if (obj)
            {
                AIscript = obj.AddComponent <BasicAIController>();
                AIscript.enemyTags.Add("Player");
                Selection.activeGameObject = obj;
            }
        }