void Start()
    {
        PowerTrail thisPowerTrail = GetComponent <PowerTrail>();

        thisPowerTrail.skipStartupShutdownSounds = true;
        source.OnPowerFinish += () => thisPowerTrail.powerIsOn = true;
        // Not technically correct if you want it to act as one continuous PowerTrail, but good enough for now
        source.OnDepowerBegin += () => thisPowerTrail.powerIsOn = false;
    }
    // Use this for initialization
    protected override void Awake()
    {
        base.Awake();
        if (powerTrailToReactTo == null)
        {
            powerTrailToReactTo = GetComponent <PowerTrail>();
        }
        if (powerTrailToReactTo == null)
        {
            Debug.LogWarning("No Power Trail to react to, disabling color change script", gameObject);
            enabled = false;
            return;
        }

        if (renderers == null || renderers.Length == 0)
        {
            renderers = GetComponents <SuperspectiveRenderer>();
        }
        if (renderers == null || renderers.Length == 0)
        {
            renderers    = new SuperspectiveRenderer[1];
            renderers[0] = gameObject.AddComponent <SuperspectiveRenderer>();
        }

        foreach (SuperspectiveRenderer r in renderers)
        {
            if (useMaterialAsEndColor)
            {
                poweredColor    = r.GetMainColor();
                poweredEmission = r.GetColor("_EmissionColor");
            }

            if (useMaterialAsStartColor)
            {
                depoweredColor    = r.GetMainColor();
                depoweredEmission = r.GetColor("_EmissionColor");
            }
            else
            {
                r.SetMainColor(depoweredColor);
                r.SetColor("_EmissionColor", depoweredEmission);
            }
        }

        switch (timing)
        {
        case ActivationTiming.OnPowerBegin:
            powerTrailToReactTo.OnPowerBegin    += PowerOn;
            powerTrailToReactTo.OnDepowerFinish += PowerOff;
            break;

        case ActivationTiming.OnPowerFinish:
            powerTrailToReactTo.OnPowerFinish  += PowerOn;
            powerTrailToReactTo.OnDepowerBegin += PowerOff;
            break;

        case ActivationTiming.OnDepowerBegin:
            powerTrailToReactTo.OnDepowerBegin += PowerOn;
            powerTrailToReactTo.OnPowerFinish  += PowerOff;
            break;

        case ActivationTiming.OnDepowerFinish:
            powerTrailToReactTo.OnDepowerFinish += PowerOn;
            powerTrailToReactTo.OnPowerBegin    += PowerOff;
            break;
        }
    }