using System.Collections; using System.Collections.Generic; using UnityEngine; public…
Jump to turn (6)
- 1using System.Collections; using System.Collections.Generic; using UnityEngine; p
- 2this line: Vector2 direction = (player.position - rb.position).normalized; Has t
- 3This line: bulletRB.velocity = direction bulletSpeed; Has the error CS0103
- 4it already has that line
- 5write a C# magicBullet script that when it collides with the player, the player
- 6make it oncollisionenter2d instead of ontriggerenter2d
- User
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Boss : MonoBehaviour { public float speed = 2f; public float chaseRange = 5f; private Transform player; private Vector2 targetPosition; private Rigidbody2D rb;
code