예제 #1
0
    void FixedUpdate()
    {
        m_renderer = GetComponent <Renderer>();
        player     = GameObject.Find("Player");

        if (m_renderer.isVisible)
        {
            if (!Physics.Linecast(gameObject.transform.position, player.transform.position + new Vector3(0, 2, 0)))
            {
                if (!seen)
                {
                    seen = true;
                    GameFlowManager.eventsLog.Add(EventEntity.CreateInstance(EnemyAppeardType, "id"));
                }
            }
        }
    }