/// <summary> /// The PixelVisionEngine Init() method creates the /// <see cref="ChipManager" /> and <see cref="APIBridge" /> as well as any /// additional chips supplied in the <see cref="defaultChips" /> array. /// </summary> /// <tocexclude /> public virtual void Init() { chipManager = new ChipManager(this); //apiBridge = new APIBridge(this); if (defaultChips != null) CreateChips(defaultChips); }
/** * エントリポイント * * @access private */ void Start() { // ゲームオブジェクトのコンポーネントを取得 ChipManager chip_manager = GetComponent <ChipManager>(); // チップ管理 // チップ初期化 chip_manager.init(); }
private static void FillByPresetChips(string[] chipMap) { for (var y = 0; y < BoardManager.BoardSize; y++) { for (var x = 0; x < BoardManager.BoardSize; x++) { var tile = BoardManager.Tiles[y, x]; tile?.SetChip(ChipManager.CreateChipByMapValue(chipMap, y, x)); } } }
private static void RemoveMatches() { foreach (var tile in BoardManager.Tiles) { var chip = tile?.Chip; if ((chip?.IsPreset == false) && MatchFinder.IsInMatch(chip)) { tile.DestroyChip(); tile.SetChip(ChipManager.CreateChipPseudoRandom(tile.y, tile.x)); } } }
private static void FillByPseudoRandomChips() { for (var y = 0; y < BoardManager.BoardSize; y++) { for (var x = 0; x < BoardManager.BoardSize; x++) { var tile = BoardManager.Tiles[y, x]; if (tile?.Chip != null) { continue; } tile?.SetChip(ChipManager.CreateChipPseudoRandom(y, x)); } } }
private Sequence TrySpawnChip(float spawnDelay) { if (Tile == null) { return(null); } if (Tile.Chip != null) { return(null); } Tile.SetChip(ChipManager.CreateRandomChip()); Tile.Chip.transform.position += Vector3.up * TileManager.TileSize; var chipSprite = Tile.Chip.GetComponent <SpriteRenderer>(); var tmp = chipSprite.color; tmp.a = 0f; chipSprite.color = tmp; var seqSpawn = DOTween.Sequence().Append(Tile.Chip.Appear(spawnDelay)); return(seqSpawn); }
/** * エントリポイント * * @access private */ void Start() { // ゲームオブジェクトのコンポーネントを取得 this._chip_manager = GetComponent <ChipManager>(); // チップ管理 }