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.
 
 
 
 
 
 

49 lines
1.3 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PortalColourChange : MonoBehaviour
{
//get materials/colour from players
//hard code for now
Color person1 = new Color32(255, 91, 0, 255);
Color red2 = new Color32(255, 0, 0, 255);
Color purple1 = new Color32(183, 96, 255, 255);
Color purple2 = new Color32(140, 0, 255, 255);
Color yellow1 = new Color32(252, 255, 124, 255);
Color yellow2 = new Color32(250, 255, 0, 255);
Color green1 = new Color32(30, 255, 64, 255);
Color green2 = new Color32(0, 196, 29, 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;
//while not everyone has exited
mainEdge.startColor = purple1;
mainInSpark.startColor = new ParticleSystem.MinMaxGradient(purple2, purple1);
mainRandomSparks.startColor = new ParticleSystem.MinMaxGradient(purple2, purple1);
mainRing.startColor = purple1;
mainSmoke.startColor = purple2;
//yield return new WaitForSeconds(5);
//loop until all players have fhit the portal
}
}