コード例 #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);    //更新個人資料
        }
    }
コード例 #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}";
        });
    }
コード例 #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>();
    }
コード例 #4
0
ファイル: PlayerMover.cs プロジェクト: SyFySkyE/Need4Greed
 // Start is called before the first frame update
 void Start()
 {
     playerManager = GetComponent <PlayerManage>();
     playerRB      = GetComponent <Rigidbody>();
 }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     playerAnim    = GetComponent <Animator>();
     playerManager = GetComponent <PlayerManage>();
 }
コード例 #6
0
 // Start is called before the first frame update
 void Start()
 {
     playerAudio   = GetComponent <AudioSource>();
     playerManager = GetComponent <PlayerManage>();
 }
コード例 #7
0
 void Awake()
 {
     Instance = this;
 }
コード例 #8
0
 private void Start()
 {
     playerManager = GetComponent <PlayerManage>();
 }
コード例 #9
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerManage>();
 }
コード例 #10
0
ファイル: BossSpawn.cs プロジェクト: SyFySkyE/Need4Greed
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <PlayerManage>();
 }
コード例 #11
0
 // Start is called before the first frame update
 void Start()
 {
     this.gameObject.layer = 8;
     playerManager         = GetComponent <PlayerManage>();
     UpdateHPText();
 }