Exemplo n.º 1
0
    //A list containing every value of the HexagonDirection Enum for easy iteration


    void Start()
    {
        open         = new List <HexNode>();
        controller   = GameObject.FindGameObjectWithTag("PlayingField").GetComponent <PlayingFieldController>();
        previousNode = new Dictionary <HexagonTile, HexagonTile>();
        checkedNodes = new HashSet <HexagonTile>();
    }
Exemplo n.º 2
0
    //when a group is created, it should be added to a playingfield before it can start falling
    public void StartFalling(PlayingFieldController thePlayingField, int playerID, float fallingDelay)
    {
        Debug.Log("StartFalling");
        inWaitingRoom       = false;
        this.PlayerNr       = playerID;
        this.fallDelay      = fallingDelay;
        this.myPlayingField = thePlayingField;

        thePlayingField.RegisterFallingBlock(this);
    }
Exemplo n.º 3
0
    public void JoinGame()
    {
        points    = 0;
        level     = 0;
        fallDelay = 1;
        MyColor   = ChooseRandomColor();

        playingField  = Object.FindObjectOfType <PlayingFieldController>();
        this.playerNr = playingField.RegisterNewPlayer(this);
        SetNextGroup(playingField.CreateNewNextGroup(this));
        ActivateNextGroup(playingField.CreateNewNextGroup(this));

        this.PlayerStatus = PlayerStatusEnum.PLAYING;
    }
Exemplo n.º 4
0
    public void GenerateField(PlayingFieldController playingField, GameOptions gameOptions)
    {
        int size = gameOptions.WorldSize / 2;

        for (int x = -size; x <= size; x++)
        {
            for (int z = -size; z <= size; z++)
            {
                // Skip every even tile on the first z, so the playing field is symmetrical for opposing players.
                if (z == -size && x % 2 == 0)
                {
                    continue;
                }

                playingField.CreateTile(new Point(x, z));
            }
        }
    }
 public void GenerateField(PlayingFieldController playingField, GameOptions gameOptions)
 {
     throw new System.NotImplementedException();
 }