Example #1
0
 public Arrow()
 {
     Type      = 3;
     ArrowObjs = new GameObject[8];
     CreateArrow(Type);
     MsgBase.MsgAdd("LoadLoadArrow", LoadLoadArrow);
 }
Example #2
0
    private void OffGyroallback()
    {
        PlayerPrefs.SetInt("GUIDE3D", 3);
        MsgBase.MsgAdd <GameObject, MySkyInputEvent.DragState, Vector2, Vector2, Vector3>("EventDrag", EventDrag);
        MsgBase.MsgAdd <GameObject, MySkyInputEvent.ClickState, Vector2>("EventClick", OnClickPhoto);


        PhotoCameraObj      = new GameObject();
        PhotoCameraObj.name = "PhotoCameraObj1111111";
        PhotoCameraObj.transform.SetParent(SCameraManager.currentCamera.gameObject.transform.parent.gameObject.transform);



        Royboj = Instantiate(Resources.Load("photo/Rotation")) as GameObject;
        Royboj.SetActive(false);
        Royboj.transform.SetParent(PhotoCameraObj.transform);
        Royboj.transform.localPosition = new Vector3(0, -2.5f, 6.22f);

        tutorialProcess2 = new TutorialProcess2(TutorialUIObj, TutorialUIObj2);


        FindConfig      = MonoBehaviour.Instantiate(Resources.Load("photo/Find_config")) as GameObject;
        FindConfig.name = "FindConfig";
        FindConfig.transform.SetParent(gameObject.transform);
        m_FindConfig       = FindConfig.GetComponent <Find_Item_Config>();
        m_PhotoConfigArray = new PhotoConfigArray();
        TutorialItem tutorialItem = new TutorialItem(gameObject);

        tutorialItem.Init(20);
        MsgBase.SendMsg("OpenGyroController");
    }
Example #3
0
    private void IosStart()
    {
        Instance = this;
        SCameraManager.CreateCamera(SCameraType.EASYAR);
        GameObject Gyro = new GameObject();

        Gyro.name = "GyroController";
        Gyro.AddComponent <MySkyGyroController>();
        Gyro.transform.SetParent(GameObject.Find("Manager").gameObject.transform);
        Gyro.transform.localPosition = Vector3.zero;
        SCameraManager.currentCamera.gameObject.transform.SetParent(Gyro.transform);
        m_BlurOptimized = SCameraManager.currentCamera.camera.gameObject.GetComponent <BlurOptimized>();
        m_SUILoading    = SUILoading.CreateLoading();
        Start3D         = PlayerPrefs.GetInt("3DStart");
        Start3D++;
        PlayerPrefs.SetInt("3DStart", Start3D);
        // PlayerPrefs.SetInt("GUIDE3D", 1);
        MsgBase.MsgAdd <string>("OnOpenScene", OnOpenScene);
        MsgBase.MsgAdd <string, Callback>("RemoveScene2", RemoveScene2);
        MsgBase.MsgAdd <string>("RemoveScene", RemoveScene1);
        MsgBase.MsgAdd("RemoveTutorial", RemoveTutorial);
        MsgBase.MsgAdd <string>("HideScene", HideScene);
        MsgBase.MsgAdd <bool, float>("ShowBlur", ShowBlur);
        OnOpenScene("UI");
        if (PlayerPrefs.GetInt("GUIDE3D") == 3)
        {
            OnOpenScene("PhotoScene");
        }
    }
Example #4
0
 private void Init()
 {
     imageManager        = gameObject.AddComponent <ImageManager2>();
     Instance            = this;
     itemManager         = new ItemManager(gameObject);
     photoprompt         = new Photoprompt(itemManager);
     m_PhotoNotReachable = new PhotoNotReachable(PhotoNotReachableButtonEvent);
     MsgBase.MsgAdd <GameObject, MySkyInputEvent.DragState, Vector2, Vector2, Vector3>("EventDrag", EventDrag);
     MsgBase.MsgAdd <GameObject, MySkyInputEvent.ClickState, Vector2>("EventClick", OnClickPhoto);
     MsgBase.MsgAdd("Updatephoto", Updatephoto);
     MsgBase.MsgAdd <Callback, bool>("SetIsAngle02", SetIsAngle02);
 }
Example #5
0
    void Awake()
    {
        Initacne = this;
        //打开 或关闭 UI
        MsgBase.MsgAdd("HomePageMagShowUI", base.Play);
        MsgBase.MsgAdd("HomePageMagQuitUI", base.Quit);
        //主菜单功能 按钮事件
        MsgBase.MsgAdd <string>("ButtonEvnetCallback", ButtonEvnetCallback);
        //收回 Menu 菜单
        MsgBase.MsgAdd("BaseButtonEvnet2", BaseButtonEvnet2);
        //帮助 事件
        MsgBase.MsgAdd("help", helpEvnet);
        //帮助页内  返回按钮事件
        MsgBase.MsgAdd("help04", help04Evnet);

        //滑动事件
        MsgBase.MsgAdd <GameObject, MySkyInputEvent.Direction>("EventSlideDirection", Slide_MineButtonEvnet);
        //开启或 关闭 滑动事件
        MsgBase.MsgAdd <bool>("ISslide", isSlide);
        //宠物 按钮
        MsgBase.MsgAdd("pet", pet);
        //截屏 事件
        MsgBase.MsgAdd("Screenshot", Photograph);
        //打开刷新按钮
        MsgBase.MsgAdd <bool>("isRefresh", isRef);

        //附近返回
        MsgBase.MsgAdd("U2N_N_CloseNearby", NearbyBack);

        //单张点击返回
        MsgBase.MsgAdd("U2N_N_CloseStory", StoryCallback);
        //拍照返回
        MsgBase.MsgAdd <bool, JsonData>("U2N_N_CloseSendStory", UpPhotoBack);
        //重复教程
        MsgBase.MsgAdd("help01", help01Evnet);


        //按钮不可用状态

        MsgBase.MsgAdd <string, bool>("SetButtonLose", SetButtonLose);

        MsgBase.MsgAdd("U2N_N_CloseMainMenu", U2N_N_CloseMainMenu);
        MsgBase.MsgAdd("U2N_N_CloseMap", CloseMap);
        MsgBase.MsgAdd("U2N_N_OpenMainScene", U2N_N_OpenMainScene);
        MsgBase.MsgAdd("U2N_N_CloseMainScene", U2N_N_CloseMainScene);
        MsgBase.MsgAdd("U2N_N_CheeseBack", U2N_N_CheeseBack);
        MsgBase.MsgAdd("U2N_N_CloseWorld", U2N_N_CloseWorld);
    }
Example #6
0
    protected void Start()
    {
        MsgBase.MsgAdd("OpenGyroController", OpenGyroController);
        MsgBase.MsgAdd("OffGyroController", OffGyroController);
        MsgBase.MsgAdd <Callback>("OffGyroControllerCallback", OffGyroController1);
        instance    = this;
        m_transform = this.gameObject.transform;
#if USE_NATIVE_R
        Messenger.AddListener <bool>("Native_startRotationCallBack", Native_startRotationCallBack);
        SkyNativeManager.Instance.startRotation();
        isStartNativeRotation = false;
#endif

        if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
        {
            AttachGyro();
            Input.gyro.enabled = true;
            EnableGyro(true);
        }
        isOpen = true;
    }
Example #7
0
    // Use this for initialization
    void Start()
    {
#if UNITY_IOS
        Messenger.AddListener("U2N_N_StartAppCamera",
                              delegate(){
            //TODO 开启场景和AR相机
            IosStart();
        });
#endif
#if UNITY_ANDROID
        Instance = this;
        SCameraManager.CreateCamera(SCameraType.EASYAR);
        GameObject Gyro = new GameObject();
        Gyro.name = "GyroController";
        Gyro.AddComponent <MySkyGyroController>();
        Gyro.transform.SetParent(GameObject.Find("Manager").gameObject.transform);
        Gyro.transform.localPosition = Vector3.zero;
        SCameraManager.currentCamera.gameObject.transform.SetParent(Gyro.transform);
        m_BlurOptimized = SCameraManager.currentCamera.camera.gameObject.GetComponent <BlurOptimized>();
        m_SUILoading    = SUILoading.CreateLoading();
        Start3D         = PlayerPrefs.GetInt("3DStart");
        Start3D++;
        PlayerPrefs.SetInt("3DStart", Start3D);
        // PlayerPrefs.SetInt("GUIDE3D", 1);
        MsgBase.MsgAdd <string>("OnOpenScene", OnOpenScene);
        MsgBase.MsgAdd <string, Callback>("RemoveScene2", RemoveScene2);
        MsgBase.MsgAdd <string>("RemoveScene", RemoveScene1);
        MsgBase.MsgAdd("RemoveTutorial", RemoveTutorial);
        MsgBase.MsgAdd <string>("HideScene", HideScene);
        MsgBase.MsgAdd <bool, float>("ShowBlur", ShowBlur);
        OnOpenScene("UI");
        // if (PlayerPrefs.GetInt("GUIDE3D") == 3)
        {
            // OnOpenScene("PhotoScene");
        }
#endif
    }
Example #8
0
    // Use this for initialization


    void Start()
    {
        MsgBase.MsgAdd("CloseAR", CloseAR);

        HomePageChildDictionary["ar"].SetActive(true);
    }
Example #9
0
 void Awake()
 {
     MsgBase.MsgAdd("photoUIeventShowUI", base.Play);
     MsgBase.MsgAdd("photoUIeventQuitUI", base.Quit);
 }