//[SerializeField] private float maxTimer; private void Start() { m_Target = GameObject.Find("Player"); m_Patrol = GetComponent <AIPatrolModus>(); fow = GetComponent <FOW>(); m_GameOver = GameObject.Find("UI").GetComponent <Transform>().transform.Find("Death Menu").gameObject; }
IEnumerator AllowAutoAddParty() { yield return(new WaitForSeconds(.31f)); characterManager = FindObjectOfType <CharacterManager>(); playerParty = FindObjectOfType <PlayerParty>(); data.playerParty = FindObjectOfType <PlayerParty>(); inventoryDisplay = FindObjectOfType <InventoryDisplay>(); inventoryItem = FindObjectsOfType <InventoryItem>(); currencyManager = GetComponent <CurrencyManager>(); currencyUI = FindObjectOfType <CurrencyUI>(); fogOfWar = FindObjectOfType <FOW>(); equipItems = FindObjectsOfType <EquipItems>(); }
void OnSceneGUI() { FOW fow = (FOW)target; Handles.color = Color.white; Vector3 viewAngleL = fow.DirFromAngle(-fow.viewAngle / 2, false); Vector3 viewAngleR = fow.DirFromAngle(fow.viewAngle / 2, false); Handles.DrawWireArc(fow.transform.position, Vector3.up, viewAngleL, fow.viewAngle, fow.viewRadius); Handles.DrawLine(fow.transform.position, fow.transform.position + viewAngleL * fow.viewRadius); Handles.DrawLine(fow.transform.position, fow.transform.position + viewAngleR * fow.viewRadius); Handles.color = Color.red; foreach (Vector3 r in fow.rays) { Handles.DrawLine(fow.transform.position, fow.transform.position + r); } }
void Start() { mesh = GetComponent <MeshFilter>().mesh; fov = GetComponentInParent <FOW>(); }
void Start() { //Malla y campo de visión mesh = GetComponent <MeshFilter>().mesh; fow = GetComponentInParent <FOW>(); }
public override void OnLateUpdate() { base.OnLateUpdate(); FOW.ManualUpdate(); }
protected override void OnBattleLoadedScene() { base.OnBattleLoadedScene(); EnableFOW(true); FOW.SetAll(0); }
public bool IsInFog(Vector3 pos) { return(FOW.GetFogValue(pos) > 0); }
/// <summary> /// 是否在迷雾内 /// </summary> /// <param name="pos"></param> /// <param name="minFog"></param> /// <returns></returns> public bool IsInFog(Vector3 pos, byte minFog) { return(FOW.GetFogValue(pos) > minFog); }
/// <summary> /// 设置所有 /// </summary> /// <param name="val"></param> public void SetAll(byte val) { FOW.SetAll(val); }