fletchy95/SDM_Delta

Light Issue Mac Side

Opened this issue · 2 comments

There is an issue that is isolated to the mac side where the lighting on the conditional level is going behind all of the game sprites and objects. The level still works fine if you can complete the conditionals without the lighting but you cannot see the light except for the top one.

Everything works fine on the windows side.

Code behind the Light switcher:
`
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LightSwitcher : MonoBehaviour {
public new Light light;

// Use this for initialization
void Start () {
    light = GetComponent<Light>();
    light.color = Color.clear;
}

// Update is called once per frame
void Update () {
}

void OnTriggerEnter2D(Collider2D col)
/* Input: N/A (Runs in place of Update.  Will test once per frame).
 * Purpose: Will test for collision from gameObject Avatar (Point A).  Once true it ensures
 * that the DialogueManager is not currently active (Point  B).  If that says false (inactive
 * DialogueManager) then it will send over the dialogueLines to DialogueManager's 
 * dialogueLines for displaying to the user.  
 */
{
    if (col.gameObject.name == "Avatar")
    {
        LightChanger();
    }

}

void LightChanger()
{
    //if (Input.GetKeyDown(KeyCode.Return))
    // Point A
    {
        if (light.color == Color.clear)
        {
            light.color = Color.yellow;
        }
        if (light.color == Color.yellow)
        {
            light.color = Color.blue;
        }
        else if (light.color == Color.blue)
        {
            light.color = Color.red;
        }
        else if (light.color == Color.red)
        {
            light.color = Color.yellow;
        }
    }
}

}

`

Image of Unity Screen:
screen shot 2018-04-17 at 5 26 59 pm

Image of In Game Scene:
screen shot 2018-04-17 at 5 27 25 pm