//[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;
    }
Beispiel #2
0
    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>();
    }
Beispiel #3
0
    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);
        }
    }
Beispiel #4
0
 void Start()
 {
     mesh = GetComponent <MeshFilter>().mesh;
     fov  = GetComponentInParent <FOW>();
 }
Beispiel #5
0
 void Start()
 {
     //Malla y campo de visión
     mesh = GetComponent <MeshFilter>().mesh;
     fow  = GetComponentInParent <FOW>();
 }
Beispiel #6
0
 public override void OnLateUpdate()
 {
     base.OnLateUpdate();
     FOW.ManualUpdate();
 }
Beispiel #7
0
 protected override void OnBattleLoadedScene()
 {
     base.OnBattleLoadedScene();
     EnableFOW(true);
     FOW.SetAll(0);
 }
Beispiel #8
0
 public bool IsInFog(Vector3 pos)
 {
     return(FOW.GetFogValue(pos) > 0);
 }
Beispiel #9
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);
 }
Beispiel #10
0
 /// <summary>
 /// 设置所有
 /// </summary>
 /// <param name="val"></param>
 public void SetAll(byte val)
 {
     FOW.SetAll(val);
 }