Ejemplo n.º 1
0
        public int print_victory(ConnectWork link)
        {
            victory str = new victory();

            str = getStruct <victory>(Marshal.SizeOf(str));
            Console.WriteLine("l'équipe gagnante est l'équipe n° " + str.team);
            Console.WriteLine("elle gagne avec " + str.score + " points");
            return(0);
        }
    // Use this for initialization
    void Start()
    {
        rb2d = GetComponent <Rigidbody2D>();
        rb2d.freezeRotation = true; //don't want rotation with this! Will make our character fall over.

        blockArea = GetComponent <BoxCollider2D>();

        gOver   = GetComponent <gameOver>();
        victory = GetComponent <victory>();

        if (player.clear)
        {
            player.clear = false;
        }
    }
Ejemplo n.º 3
0
    public void announceVictory(int win)
    {
        Header h = new Header();

        h.id_command = 4;
        victory vic = new victory();

        vic.team = win;
        if (win % 2 == 0)
        {
            vic.score = _team0.total_value();
        }
        else
        {
            vic.score = _team1.total_value();
        }
        foreach (Player player in _players)
        {
            player.write <Header>(h);
            player.write <victory>(vic);
        }
    }