Ejemplo n.º 1
0
        private void Start()
        {
            seeker       = GetComponent <Seeker>();
            rb           = GetComponent <Rigidbody2D>();
            mover        = GetComponent <Mover>();
            enemyControl = GetComponent <EnemyControl>();
            patrolPath   = transform.parent.GetComponentInChildren <EnemyPath>();

            StateToPatrol();
        }
        public override void OnInspectorGUI()
        {
            EnemyPath enemyPath = (EnemyPath)target;

            DrawDefaultInspector();

            if (GUILayout.Button("Add Path Node"))
            {
                enemyPath.AddNode();
            }
            if (GUILayout.Button("Remove Path Node"))
            {
                enemyPath.RemoveNode();
            }
        }