-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Added scattered papers model. Added hardware inventory list to hardware tab in center MFD. Fixed bug where viewmodels would get scrunched during crouching or prone. Fixed a few MFD reference bugs. Protected against some null reference scenarios. Added the compass in the HUD with varying levels of tick marks that are version dependent. Added grenade usage for throwing grenades (inv mode only currently, need to link in hotkey) Added "live" cursor text for when holding a live grenade. Added mouse-over cursor change to an arrow when above the MFD tab buttons. Added tooltip style text next to mousecursor when over MFD tab buttons. Added email inventory list similar to log list but not linked to anything yet. Fixed bug when first using puzzle panels and keycode pads where initialization failed to occur in some instances. Fixed a few more bugs related to MFD initialization on first item pickup. Fixed MFD initialization when first searching. Changed some constant variable references to refer to the global Const.a instance for consistency.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class LightsManager : MonoBehaviour { | ||
private GameObject[] lightChildrenGOs; | ||
private Light[] lightChildren; | ||
private int childCount; | ||
public float distanceToDisableLightsFromPlayer = 10f; | ||
|
||
void Start () { | ||
childCount = transform.childCount; | ||
lightChildren = new Light[childCount]; | ||
lightChildrenGOs = new GameObject[childCount]; | ||
for (int i=0;i<childCount;i++) { | ||
lightChildrenGOs[i] = transform.GetChild(i).gameObject; | ||
lightChildren[i] = lightChildrenGOs[i].GetComponent<Light>(); | ||
} | ||
} | ||
|
||
void Update () { | ||
for (int i=0;i<lightChildren.Length;i++) { | ||
if (lightChildrenGOs[i] != null) { | ||
if ((Vector3.Distance(Const.a.player1.transform.position,lightChildrenGOs[i].transform.position)) > distanceToDisableLightsFromPlayer) { | ||
lightChildrenGOs[i].SetActive(false); | ||
} else { | ||
lightChildrenGOs[i].SetActive(true); | ||
} | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.