Example #1
0
    public void CreateEchoEffect(Vector4 originPos)
    {
        EchoImageEffect newEchoImageEffect = this.gameObject.AddComponent <EchoImageEffect>();

        newEchoImageEffect.EffectMaterial       = effectMat;
        newEchoImageEffect.Origin               = originPos;
        newEchoImageEffect.Width                = width;
        newEchoImageEffect.LeadingEdgeSharpness = sharpness;
        newEchoImageEffect.MaxRange             = range;
        newEchoImageEffect.Speed                = speed;
    }
Example #2
0
    public void CreateEchoEffect(Vector4 originPos, float inputLevel)
    {
        originPos = new Vector4(originPos.x, originPos.y - 0.5f, originPos.z, originPos.w);
        EchoImageEffect newEchoImageEffect = this.gameObject.AddComponent <EchoImageEffect>();

        newEchoImageEffect.EffectMaterial       = effectMat;
        newEchoImageEffect.Origin               = originPos;
        newEchoImageEffect.Width                = width;
        newEchoImageEffect.LeadingEdgeSharpness = sharpness;
        newEchoImageEffect.MaxRange             = range * inputLevel;
        //Debug.Log(string.Format("{0} X {1} = {2}", range, inputLevel, range * inputLevel));
        newEchoImageEffect.Speed = speed;
    }