예제 #1
0
 void Start()
 {
     tileMap = GetComponent <Tilemap>();
     if (PhotonNetwork.InRoom)
     {
         ActivePlayer = PhotonNetwork.LocalPlayer.GetPlayerNumber();
         object seed;
         PhotonNetwork.CurrentRoom.CustomProperties.TryGetValue(RoomLauncher.SEED_PROP_KEY, out seed);
         TMG.GenerateWithSeed((int)seed);
         initializedPlayers = new List <bool>(PhotonNetwork.CurrentRoom.PlayerCount);
         initializedPlayers[ActivePlayer] = true;
     }
     else
     {
         TMG.Generate();
     }
     SetDefaults();
     BoardHighlights = Highlights.GetComponent <BoardHighlights>();
     BoardHighlights.Generate(W, H);
     SpawnAllPlayers();
     initializedPlayers = new List <bool>(numPlayers);
     items          = new List <Item>();
     itemController = ItemTilemap.GetComponent <ItemController>();
     SpawnInitialItems();
     SendFinishInitEvent();
 }
예제 #2
0
    private void Start()
    {
        Instance = this;

        highlights    = new List <GameObject>();
        redHighlights = new List <GameObject>();
    }
예제 #3
0
 // Initlization function.
 private void Start()
 {
   // Create instance of highlight class.
   Instance=this;
   // Initialization of highlights list.
   this.highlights=new List<GameObject>();
 } // End of Start
예제 #4
0
    // Start is called before the first frame update
    void Start()
    {
        _BoardHighlights = gameObject.GetComponent <BoardHighlights>();

        _ChessEngine = gameObject.GetComponent <ChessEngine>();
        SpawnAllPieces();
        SpawnAllSnapzones();
        InitTurn();
    }
예제 #5
0
 private void Start()
 {
     // Debug.Log("GAME STARTED");
     Width      = 8;
     Height     = 8;
     numPlayers = 0;
     playerTurn = 0;
     xxx        = BoardHighlights.Instance;
     SpawnAllPlayers();
     selectedCharacter = Characters[0];
 }
예제 #6
0
    private void Start()
    {
        Instance   = this;
        highlights = new List <GameObject>();
        parent     = new GameObject("Highlights");

        selectedHighlight = Instantiate(selectedPref);
        selectedHighlight.SetActive(false);

        hoverHighlight = Instantiate(hoverHighlightPrefab);
        hoverHighlight.SetActive(false);

        killerHighlight = Instantiate(killerHighlighPrefab);
        killerHighlight.SetActive(false);

        checkedHighlight = Instantiate(killerHighlighPrefab);
        checkedHighlight.SetActive(false);
    }
예제 #7
0
 public void Start()
 {
     Instance   = this;
     highlights = new List <GameObject>();
     lastMove   = new List <GameObject>();
 }
예제 #8
0
 private void Start()
 {
     // set instance to this, instantiate list of highlights
     Instance   = this;
     highlights = new List <GameObject>();
 }
예제 #9
0
 private void Start()
 {
     Instance   = this;
     highlights = new List <GameObject>(); //전역에다가 선언해도 문제는 없다. 그냥 개발자의 마음
 }
예제 #10
0
 private void Start()
 {
     _BoardManager    = this.transform.parent.GetComponent <BoardManager>();
     _BoardHighlights = this.transform.parent.GetComponent <BoardHighlights>();
 }
예제 #11
0
 private void Start()
 {
     // Instantiates the singleton
     Instance = this;
     instantiateHighlightObjects();
 }
예제 #12
0
 public HumanPlayer(int playerId, PieceColour colour, InternalBoard internalBoard) :
     base(playerId, colour, internalBoard)
 {
     highlightsManager = BoardHighlights.Instance;
 }
예제 #13
0
    private List <GameObject> Highlights; //list of highlights

    private void Start()
    {
        Instance   = this;
        Highlights = new List <GameObject>();    //instantiate list of highlights as list of GameObjects
    }
 private void Start()
 {
     Instance = this;
     PlaceAllTiles();
 }