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.
77 lines
2.0 KiB
77 lines
2.0 KiB
3 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityStandardAssets.ImageEffects;
|
||
|
|
||
|
//负责读取设定的内容,并改变镜头和镜头外UI的内容
|
||
|
public class UI_CameraController : MonoBehaviour {
|
||
|
public bool[] boolSettingPool;
|
||
|
public GameObject hpBulletShow;
|
||
|
public GameObject grenadeShow;
|
||
|
public GameObject armorShow;
|
||
|
public GameObject upStatusShow;
|
||
|
public GameObject rulerShow;
|
||
|
public GameObject equipmentShow;
|
||
|
public GameObject Camera_;
|
||
|
|
||
|
|
||
|
// Use this for initialization
|
||
|
void Start () {
|
||
|
for (int i=0;i<11;i++)
|
||
|
{
|
||
|
boolSettingPool[i] = SaveSystem.GetBool("gameSetting" + i);
|
||
|
}
|
||
|
IsHpBulletOpen(boolSettingPool[0]);
|
||
|
IsGrenadeOpen(boolSettingPool[1]);
|
||
|
IsArmorOpen(boolSettingPool[2]);
|
||
|
IsUpStatusOpen(boolSettingPool[3]);
|
||
|
IsRulerOpen(boolSettingPool[4]);
|
||
|
IsEquipmentOpen(boolSettingPool[5]);
|
||
|
IsCameraEffectOpen(boolSettingPool[8],boolSettingPool[9],boolSettingPool[10]);
|
||
|
|
||
|
}
|
||
|
|
||
|
void IsHpBulletOpen(bool i) {
|
||
|
if (!i) {
|
||
|
hpBulletShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsGrenadeOpen(bool i) {
|
||
|
if (!i) {
|
||
|
grenadeShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsArmorOpen(bool i) {
|
||
|
if (!i) {
|
||
|
armorShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsUpStatusOpen(bool i) {
|
||
|
if (!i) {
|
||
|
upStatusShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsRulerOpen(bool i) {
|
||
|
if (!i) {
|
||
|
rulerShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsEquipmentOpen(bool i) {
|
||
|
if (!i) {
|
||
|
equipmentShow.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
void IsCameraEffectOpen(bool i,bool j,bool k) {
|
||
|
if (i) {
|
||
|
Camera_.GetComponent<GlobalFog>().enabled = true;
|
||
|
}
|
||
|
if (j) {
|
||
|
Camera_.GetComponent<Bloom>().enabled = true;
|
||
|
}
|
||
|
if (k) {
|
||
|
Camera_.GetComponent<SSAOPro>().enabled = true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|