Exemple #1
0
    public void addNewPlayerIcon(Profile p)
    {
        float Indent = (Screen.width - SizeMaster.opponentSize.x * (PlayerIcons.Count + 1)) / 2f;

        Vector2    startPos = new Vector2(-(Indent + SizeMaster.opponentSize.x * (gameState.numPlayers() - PlayerIcons.Count * 1.25f)), SizeMaster.opponentsY);
        PlayerIcon icon     = new PlayerIcon(p, startPos, assets);

        icon.setPositionToValue(8f);
        icon.setAsNew(5);
        PlayerIcons.Add(icon);
        adjustPlayerIconPositions();
    }
Exemple #2
0
    void Start()
    {
        musicSource.playOnAwake = true;
        musicSource.PlayOneShot(music);


        Profile player = new Profile("player", 0, 0, assets);

        gameState        = new GameState();
        gameState.player = player;
        assets.LoadAll();



        Profile t = new Profile("tim", 0, 0, assets);

        testIcon = new PlayerIcon(t, new Vector2(0, Screen.height * .5f), assets);
        testIcon.setAsWinner(15);
        testIcon.setAsNew(15);

        /*gameState.addPlayCard(1);
         * gameState.addPlayCard(2);
         * gameState.addPlayCard(3);
         * gameState.addPlayCard(3);
         * gameState.addPlayCard(3);
         * gameState.setSituationCardIndex(3);
         * gameState.addVoteCard(1);
         * gameState.addVoteCard(2);
         * gameState.addVoteCard(3);
         *
         * Profile op1 = new Profile("timmy", 1, 0);
         * gameState.addPlayer(op1);
         * op1 = new Profile("timmy", 1, 0);
         * gameState.addPlayer(op1); gameState.addPlayer(op1); gameState.addPlayer(op1);
         */


        content       = new GUIContent();
        network       = new NetworkManager();
        currentScreen = new MainScreen(network, assets, gameState);
        // currentScreen = new VoteCardScreen(currentScreen);
        //currentScreen = new PlayCardScreen(currentScreen);
    }