private void SpawnEnemy() { Vector3 spawnPosition = player.GetPosition() + UtilsClass.GetRandomDir() * 60f;// 100f; EnemyHandler enemyHandler = EnemyHandler.Create(spawnPosition); enemyHandler.SetGetTarget(() => player); }
private void SpawnEnemy() { Vector3 spawnPosition = characterAimHandler.GetPosition() + UtilsClass.GetRandomDir() * 100f; EnemyHandler enemyHandler = EnemyHandler.Create(spawnPosition); enemyHandler.SetGetTarget(() => characterAimHandler); }
private void Start() { cameraFollow.Setup(GetCameraPosition, () => 90f, true, true); FunctionPeriodic.Create(SpawnEnemy, 2f); EnemyHandler.Create(new Vector3(20, 0)); characterAimHandler.OnShoot += CharacterAimHandler_OnShoot; }
private void SpawnEnemy() { Vector3 spawnPosition = Vector3.zero + UtilsClass.GetRandomDir() * 40f; if (characterAimHandler != null) { spawnPosition = characterAimHandler.GetPosition() + UtilsClass.GetRandomDir() * 40f; } EnemyHandler.Create(spawnPosition); }
private void Start() { //Sound_Manager.Init(); cameraFollow.Setup(GetCameraPosition, () => 60f, true, true); FunctionPeriodic.Create(SpawnEnemy, 1.5f); gridPathfinding = new GridPathfinding(new Vector3(-400, -400), new Vector3(400, 400), 5f); gridPathfinding.RaycastWalkable(); EnemyHandler.Create(new Vector3(20, 0)); characterAimHandler.OnShoot += CharacterAimHandler_OnShoot; }
private void SpawnEnemy() { Vector3 spawnPosition = characterAimHandler.GetPosition() + UtilsClass.GetRandomDir() * 60f;// 100f; EnemyHandler.Create(spawnPosition); }