Beispiel #1
0
    public string StatusPlayerN(int coin, int life, bool flag, NetworkPlayer Nplayer)
    {
        PlayerActionOnLine dd = GetPlayerN(Nplayer);

        dd.SetPlacar(coin, life, flag);
        return(dd.Tag + "  coin " + dd.GetPlacar()[0].ToString() + "  life " + dd.GetPlacar()[1].ToString());
    }
Beispiel #2
0
    //void OnTriggerEnter(Collider collision)
    //{
    //    if (!collision.tag.Equals("enemy"))
    //    {
    //        Network.Destroy(this.gameObject);
    //    }
    //}

    void OnCollisionEnter(Collision collision)
    {
        if (GetComponent <NetworkView>().isMine)
        {
            if (!collision.gameObject.tag.Equals("chao"))
            {
                if (collision.gameObject.tag.Equals("enemy"))
                {
                    PlayerActionOnLine playeraction = myPlayer.GetComponent <PlayerActionOnLine>();
                    playeraction.SetPlacar(100, 0, null);
                    Debug.Log("colidiu com inmigo");
                }


                if (collision.gameObject.tag.Contains("player") && !collision.gameObject.tag.Equals(myPlayer.tag))
                {
                    PlayerActionOnLine playeraction = myPlayer.GetComponent <PlayerActionOnLine>();
                    playeraction.SetPlacar(100, 0, null);
                    Debug.Log("colidiu com Player" + collision.gameObject.tag);
                }

                // Network.Destroy(this.gameObject);
            }
        }
    }
Beispiel #3
0
    public string StatusPlayer(int coin, int life, bool flag, string nome)
    {
        PlayerActionOnLine dd = GetPlayer(nome);

        dd.SetPlacar(coin, life, flag);

        return(dd.Tag + "  coin " + dd.GetPlacar()[0].ToString() + "  life " + dd.GetPlacar()[1].ToString());
    }
Beispiel #4
0
    void OnCollisionEnter(Collision collision)
    {
        //if (collision.gameObject.tag == "chao")
        //{

        //  PlayerAction.nochao = true;
        //    // Debug.Log("colidiu com o chao");

        //}


        //Debug.Log(collision.gameObject.name);
        //if (!collision.transform.tag.Equals("Bullet"))
        //    Destroy(collision.gameObject);
        if (collision.gameObject.tag.Equals("enemy"))
        {
            PlayerActionOnLine playeraction = myPlayer.GetComponent <PlayerActionOnLine>();
            playeraction.SetPlacar(100, 0, null);
            Debug.Log("colidiu com inmigo");
        }
    }