using System.Collections; using System.Collections.Generic; using Mirror; using UnityEngine; using UnityEngine.Events; public class MinigameTutorial : MonoBehaviour { [field:SerializeField]public SpaceshipBot BotGO{get; private set;} [SerializeField]private UnityEvent OnBotDie; void Start() { } // Update is called once per frame void Update() { } public void SpawnBot(){ Instantiate(BotGO, SpaceshipControllerSolo.player.transform.position + (SpaceshipControllerSolo.player.transform.right * 3), SpaceshipControllerSolo.player.transform.rotation).OnDie.AddListener(()=>{OnBotDie.Invoke();}); } }