Ejemplo n.º 1
0
    void Start()
    {
        _Instance = this;
        if (Network.peerType == NetworkPeerType.Client)
        {
            gameObject.SetActive(false);
            return;
        }
        IsActiveGameOver = false;
        XkGameCtrl.GetInstance().ChangeBoxColliderSize(transform);

        int max = AmmoPointTran.Length;

        for (int i = 0; i < max; i++)
        {
            if (AmmoPointTran[i] == null)
            {
                Debug.LogWarning("Unity:" + "AmmoPointTran was wrong! index " + i);
                GameObject obj = null;
                obj.name = "null";
                break;
            }
            AmmoPointTran[i].gameObject.SetActive(true);
        }
    }
Ejemplo n.º 2
0
    [RPC] void NetCtrlSendTryActiveGameOverEvent()
    {
        XkPlayerCtrl playerScript = null;

        if (XkGameCtrl.GameJiTaiSt == GameJiTaiType.FeiJiJiTai)
        {
            playerScript = XkPlayerCtrl.GetInstanceFeiJi();
            if (playerScript == null)
            {
                playerScript = XkPlayerCtrl.GetInstanceTanKe();
            }
        }
        else if (XkGameCtrl.GameJiTaiSt == GameJiTaiType.TanKeJiTai)
        {
            playerScript = XkPlayerCtrl.GetInstanceTanKe();
            if (playerScript == null)
            {
                playerScript = XkPlayerCtrl.GetInstanceFeiJi();
            }
        }
        XKTriggerGameOver.GetInstance().SpawnPlayerDaoDan(playerScript);
    }