You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

62 lines
1.4 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PortalColourChange : MonoBehaviour
{
//get materials/colour from players
//hard code for now
Color deactiveGrey = new Color32(120, 120, 120, 255);
Color red = new Color32(255, 0, 0, 255);
Color purple = new Color32(183, 96, 255, 255);
Color yellow = new Color32(255, 241, 36, 255);
//load portal
public ParticleSystem Edge;
public ParticleSystem InSpark;
public ParticleSystem RandomSparks;
public ParticleSystem Ring;
public ParticleSystem Smoke;
private void Awake()
{
var mainEdge = Edge.main;
var mainInSpark = InSpark.main;
var mainRandomSparks = RandomSparks.main;
var mainRing = Ring.main;
var mainSmoke = Smoke.main;
mainEdge.startColor = deactiveGrey;
mainInSpark.startColor = deactiveGrey;
InSpark.Stop();
mainRandomSparks.startColor = deactiveGrey;
RandomSparks.Stop();
mainRing.startColor = deactiveGrey;
mainSmoke.startColor = deactiveGrey;
Smoke.Stop();
}
private void start()
{
//when someone collects enough items
//InSpark.Play();
//RandomSparks.Play();
//Smoke.Play();
//while not everyone has exited
//mainEdge.startColor = red;
//mainInSpark.startColor = red;
//mainRandomSparks.startColor = red;
//mainRing.startColor = red;
//mainSmoke.startColor = red;
//yield return new WaitForSeconds(5);
//loop until all players have hit the portal
}
}