void SpawnNpcs()
 {
     for (int i = 0; i < enemyCount; i++)
     {
         dodger.Add(Instantiate(dodgerPrefab, FakeController.RandomPointInBounds(area, 3f), Quaternion.Euler(0, Random.Range(0f, 360f), 0), npcs).GetComponent <Dodger>());
     }
 }
        void Start()
        {
            rig            = GetComponent <Rigidbody>();
            animator       = GetComponent <Animator>();
            gameController = GetComponentInParent <GameControllerTag>();
            if (gameController == null)
            {
                isFake         = true;
                fakeController = GetComponentInParent <FakeController>();
            }

            StartCoroutine(ChangeAngleValue());
            StartCoroutine(WalkIn());

            InitArea();
        }
예제 #3
0
        void Start()
        {
            rig                 = GetComponent <Rigidbody>();
            animator            = GetComponent <Animator>();
            gameControllerThrow = GetComponentInParent <GameControllerThrow>();

            //center = gameControllerThrow != null ? gameControllerThrow.area.center : new Vector3(-20, 0, -37.5f);
            gameController = gameControllerThrow;
            if (gameController == null)
            {
                isFake         = true;
                fakeController = GetComponentInParent <FakeController>();
            }

            StartCoroutine(ChangeAngleValue());

            InitArea();
        }