Ejemplo n.º 1
0
    public void Init()
    {
        if (GamePanel.rePlay)
        {
            GamePanel.rePlay = false;
            JoinGameRoom(LastJoinRoom);
        }
        else if (!PhotonNetwork.InLobby)
        {
            PhotonNetwork.JoinLobby(SystemManage.SqlLobby);

            StartCoroutine(OnUpdateRoomEvent());

            PlayerManage.UpdateInventory(showLobbyPlayerInfo); //更新金額
            PlayerManage.UpdateProfit(showLobbyPlayerInfo);    //更新個人資料
        }
    }
Ejemplo n.º 2
0
    private void ShowBagItem()
    {
        //清除舊資料
        foreach (var g in ItemEntries)
        {
            Destroy(g.gameObject);
        }
        ItemEntries.Clear();

        //重新抓取商店資料
        PlayerManage.UpdateInventory(() => {
            foreach (var s in PlayerManage.Inventory)
            {
                GameObject entry = Instantiate(ItemPrefab);
                entry.transform.SetParent(ItemContent.transform);
                ItemEntries.Add(entry);
                entry.transform.localScale = Vector3.one;
                entry.GetComponent <ItemInBagPrefab>().Initialize(s, ShowBagItem);
            }

            BagInfo.text  = $"餘額: {PlayerManage.Wallet}\n";
            BagInfo.text += $"物品總數量: {PlayerManage.Inventory.Count}";
        });
    }
Ejemplo n.º 3
0
    private Vector3 offset = new Vector3(0, 0, 0); //手柄轴心的偏移量

    void Start()
    {
        ts = GameObject.Find("handle_x").GetComponent <RectTransform>();
        pm = GameObject.Find("player").GetComponent <PlayerManage>();
    }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     playerManager = GetComponent <PlayerManage>();
     playerRB      = GetComponent <Rigidbody>();
 }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     playerAnim    = GetComponent <Animator>();
     playerManager = GetComponent <PlayerManage>();
 }
Ejemplo n.º 6
0
 // Start is called before the first frame update
 void Start()
 {
     playerAudio   = GetComponent <AudioSource>();
     playerManager = GetComponent <PlayerManage>();
 }
Ejemplo n.º 7
0
 void Awake()
 {
     Instance = this;
 }
Ejemplo n.º 8
0
 private void Start()
 {
     playerManager = GetComponent <PlayerManage>();
 }
Ejemplo n.º 9
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerManage>();
 }
Ejemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <PlayerManage>();
 }
Ejemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     this.gameObject.layer = 8;
     playerManager         = GetComponent <PlayerManage>();
     UpdateHPText();
 }