コード例 #1
0
ファイル: win.cs プロジェクト: rizqyn9/PeplayonFix
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            ClientInstance  cl     = GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClientInstance>();
            NetworkIdentity player = other.GetComponent <NetworkIdentity>();
            NetworkIdentity item   = GetComponent <NetworkIdentity>();
            cl.hasautorry(item, player);

            SetWin();
        }
    }
コード例 #2
0
ファイル: ItemPickup.cs プロジェクト: rizqyn9/multiplayer
    private void OnTriggerEnter(Collider other)
    {
        characterControls = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterControls>();

        if (other.CompareTag("Player"))
        {
            iya    = true;
            ohteer = other.gameObject;
            NetworkIdentity playerr = other.GetComponent <NetworkIdentity>();
            NetworkIdentity itemm   = GetComponent <NetworkIdentity>();
            ClientInstance  cl      = GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClientInstance>();
            cl.hasautorry(itemm, playerr);
        }
    }