コード例 #1
0
ファイル: NormalBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection direction) {
            base.SetupBlock(type, direction);

            this.isUp = false;
#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
            this.blockRenderer.sharedMaterials = this.blockMaterials;
        }
コード例 #2
0
ファイル: StunBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state, int initCounter) {
            base.SetupBlock(type, state, initCounter);

            this.stunCounter = initCounter;
#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
            this.blockMaterials[1] = stunDownMaterial;
            this.blockRenderer.materials = this.blockMaterials;
        }
コード例 #3
0
ファイル: GlassBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, int initCounter) {
            base.SetupBlock(type, initCounter);

            //this._maxCount = initCounter;
            this.previousBreakCount = initCounter;
            this.breakCount = initCounter;

#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
        }
コード例 #4
0
ファイル: MultiBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection firstDirection, BlockInfo.BlockDirection secondDirection, BlockInfo.BlockState state) {
            base.SetupBlock(type, firstDirection, secondDirection, state);

            if(state == BlockInfo.BlockState.UP){
                this.isUp = true;
#if UNITY_EDITOR
                this.SetMiscMaterial();
#endif
                this.blockRenderer.sharedMaterials = this.blockMaterials;
            } else {
#if UNITY_EDITOR
                this.SetMiscMaterial();
#endif
                this.blockRenderer.sharedMaterials = this.blockMaterials;
            }
        }
コード例 #5
0
ファイル: GlassBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state, int initCounter) {
            base.SetupBlock(type, state, initCounter);

            //this._maxCount = initCounter;
            this.previousBreakCount = initCounter;
            this.breakCount = initCounter;

#if UNITY_EDITOR
            this.SetMiscMaterial();
            if(this.BlockState == BlockInfo.BlockState.UP) {
                this.blockMaterials[0] = this.tileUpMaterial;
            } else {
                this.blockMaterials[0] = this.tileDownMaterial;
            }
            this.blockRenderer.sharedMaterials = this.blockMaterials;
#endif
        }
コード例 #6
0
ファイル: WarpBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection direction) {
            base.SetupBlock(type, direction);

            this.warpDirection = (PlayerInfo.MovementDirection)((int)direction);
#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
            this.blockMaterials[1] = this.warpDownMaterial;
            this.blockRenderer.sharedMaterials = this.blockMaterials;
        }
コード例 #7
0
ファイル: EmptyBlock.cs プロジェクト: ChrisJong/Harmony
 public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state) {
     base.SetupBlock(type, state);
 }
コード例 #8
0
ファイル: SwitchBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state) {
            base.SetupBlock(type, state);
#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
            this.blockMaterials[1] = this.switchDownMaterial;
            this.blockRenderer.materials = this.blockMaterials;
        }
コード例 #9
0
ファイル: NumberBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state, int initCounter) {
            base.SetupBlock(type, state, initCounter);

            this.currentCounter = initCounter;
            this.previousCounter = initCounter;
            this.maxCounter = initCounter;

            if(state == BlockInfo.BlockState.UP) {
                this.blockMaterials[1] = this.numberMaterials[currentCounter];
                this.blockRenderer.materials = this.blockMaterials;

                this.isReversed = true;
            } else {
                this.blockMaterials[1] = this.numberMaterials[currentCounter];
                this.blockRenderer.materials = this.blockMaterials;

                this.isReversed = false;
            }
        }
コード例 #10
0
ファイル: SwitchEmptyBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state) {
            base.SetupBlock(type, state);

            if(state == BlockInfo.BlockState.UP)
                this.isReversed = true;
        }
コード例 #11
0
ファイル: BlockClass.cs プロジェクト: ChrisJong/Harmony
        public virtual void SetupBlock(BlockInfo.BlockTypes type) {
            this._blockType = type;
            this._blockState = BlockInfo.BlockState.NONE;

            this._firstDirection = BlockInfo.BlockDirection.NONE;
            this._secondDirection = BlockInfo.BlockDirection.NONE;

            this.SetTileMaterial();
        }
コード例 #12
0
ファイル: BlockClass.cs プロジェクト: ChrisJong/Harmony
        public virtual void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection firstDirection, BlockInfo.BlockDirection secondDirection, BlockInfo.BlockState state) {
            this._blockType = type;
            this._blockState = state;
            this._previousState = state;

            this._firstDirection = firstDirection;
            this._secondDirection = secondDirection;

            this._blockDirections.Add(firstDirection);
            this._blockDirections.Add(secondDirection);

            this.firstDirectionValue = (int)firstDirection;
            this.secondDirectionValue = (int)secondDirection;

            this.SetTileMaterial();
        }
コード例 #13
0
ファイル: BlockClass.cs プロジェクト: ChrisJong/Harmony
        public virtual void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection direction) {
            this._blockType = type;
            this._blockState = BlockInfo.BlockState.NONE;

            this._firstDirection = direction;
            this._secondDirection = BlockInfo.BlockDirection.NONE;

            this._blockDirections.Add(direction);

            this.firstDirectionValue = (int)direction;

            this.SetTileMaterial();
        }
コード例 #14
0
ファイル: BlockClass.cs プロジェクト: ChrisJong/Harmony
        public virtual void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state, int initCounter) {
            this._blockType = type;
            this._blockState = state;
            this._previousState = state;

            this._firstDirection = BlockInfo.BlockDirection.NONE;
            this._secondDirection = BlockInfo.BlockDirection.NONE;

            this.SetTileMaterial();
        }