void Awake()
    {
        _Instance = this;

        GlobalData.GetInstance();
        fileName      = GlobalData.fileName;
        handleJsonObj = GlobalData.handleJsonObj;
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        _Instance         = this;
        pcvr.DongGanState = 1;
        XKShuiQiangCrossCtrl.GetInstance().SetPlayerCrossTr(GunCrossTran);

        SetPanelStarPos[0] = new Vector3(-350f, 243f, 0f);
        SetPanelStarPos[1] = new Vector3(-350f, 154f, 0f);
        SetPanelStarPos[2] = new Vector3(-350f, 65f, 0f);
        SetPanelStarPos[3] = new Vector3(-350f, -24f, 0f);
        SetPanelStarPos[4] = new Vector3(-350f, -112f, 0f);
        SetPanelStarPos[5] = new Vector3(-350f, -200f, 0f);
        SetPanelStarPos[6] = new Vector3(-350f, -288f, 0f);
        SetPanelStarPos[7] = new Vector3(-140f, -325f, 0f);
        SetPanelStarPos[8] = new Vector3(130f, -288f, 0f);

        JZCSStarPos[0] = new Vector3(-305f, 57f, 0f);
        JZCSStarPos[1] = new Vector3(-305f, -12f, 0f);
        JZCSStarPos[2] = new Vector3(-305f, -83f, 0f);
        JZCSStarPos[3] = new Vector3(-305f, -154f, 0f);
        JZCSStarPos[4] = new Vector3(-305f, -225f, 0f);

        StarObj = StarTran.gameObject;
        SetStarObjActive(true);

        InitHandleJson();

        InitStarImgPos();
        InitCoinStartLabel();
        InitGameDiffDuiGou();
        InitGameModeDuiGou();
        InitGameAudioValue();
        CancelInvoke("HandleGunJiaoZhunUI");
        Invoke("HandleGunJiaoZhunUI", 2f);

        InputEventCtrl.GetInstance().ClickSetEnterBtEvent += ClickSetEnterBtEvent;
        InputEventCtrl.GetInstance().ClickSetMoveBtEvent  += ClickSetMoveBtEvent;
        InputEventCtrl.GetInstance().ClickFireBtEvent     += ClickFireBtEvent;
        InputEventCtrl.GetInstance().ClickStartBtOneEvent += ClickStartBtEventP1;
        InputEventCtrl.GetInstance().ClickStartBtTwoEvent += ClickStartBtEventP2;
    }