using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Audio;
public class Click : MonoBehaviour
{
public GameObject gameCharacter;
public Animator anim;
// Start is called before the first frame update
void Start()
{
anim = GetComponent();
}
// Update is called once per frame
void OnMouseDown()
{
anim.Play("stickDeath");
Destroy(gameCharacter, 1.5f);
}
}
this is my code, is there a way to have the enemies spawn in random spots inside the cameras parameters after one of them has been destroyed?
↧