Пример #1
0
 void Start()
 {
     Instance = this;
     instance = this.gameObject;
     if (target == null)
     {
         GameObject go = GameObject.FindWithTag("Player");
         if (go == null)
         {
             return;
         }
         target = go.transform;
     }
     m_camera = GetComponent <Camera>();
 }
Пример #2
0
    void Start()
    {
        Instance = this;
        instance = this.gameObject;
        if (target == null)
        {
            GameObject go = GameObject.FindWithTag("Player");
            if (go == null)
            {
                return;
            }
            target = go.transform;
            target = MogoUtils.GetChild(target, "slot_camera");
        }


        //�ڴ������Ҫ�ų���������,�Ժ������layer�������
        //withoutTestObjectTags.Add("MainCamera");
        //withoutTestObjectTags.Add("terrain");
        //withoutTestObjectTags.Add("Player");

        EventDispatcher.TriggerEvent(Events.OtherEvent.MainCameraComplete);
        m_camera = GetComponent <Camera>();
    }
Пример #3
0
    void Start()
    {
        Instance = this;
        instance = this.gameObject;
        if (target == null)
        {
            GameObject go = GameObject.FindWithTag("Player");
            if (go == null) return;
            target = go.transform;
            target = MogoUtils.GetChild(target, "slot_camera");
        }


        //在此添加需要排除检测的物体,以后可能用layer处理更好
        //withoutTestObjectTags.Add("MainCamera");
        //withoutTestObjectTags.Add("terrain");
        //withoutTestObjectTags.Add("Player");

        EventDispatcher.TriggerEvent(Events.OtherEvent.MainCameraComplete);
        m_camera = GetComponent<Camera>();
    }