You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
940 B
C#
33 lines
940 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ParticleController : MonoBehaviour
|
|
{
|
|
public List<GameObject> projectileParticles = new List<GameObject>();
|
|
public List<GameObject> impactParticles = new List<GameObject>();
|
|
public List<GameObject> muzzleParticles = new List<GameObject>();
|
|
int index;
|
|
void Start()
|
|
{
|
|
index = PlayerPrefs.GetInt("selectedCharacterIndex");
|
|
// Debug.Log("index is" + index);
|
|
enableprojectileParticles(index);
|
|
//enableimpactParticles(index);
|
|
//enablemuzzleParticles(index);
|
|
}
|
|
public void enableprojectileParticles(int val)
|
|
{
|
|
projectileParticles[val].SetActive(true);
|
|
}
|
|
public void enableimpactParticles(int val)
|
|
{
|
|
impactParticles[val].SetActive(true);
|
|
}
|
|
public void enablemuzzleParticles(int val)
|
|
{
|
|
muzzleParticles[val].SetActive(true);
|
|
}
|
|
}
|
|
|