コード例 #1
0
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state)
        {
            base.SetupBlock(type, state);

            if (state == BlockInfo.BlockState.UP)
            {
                this.isReversed = true;
            }
        }
コード例 #2
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;
        }
コード例 #3
0
        public virtual void SetupBlock()
        {
            this._blockType  = BlockInfo.BlockTypes.NONE;
            this._blockState = BlockInfo.BlockState.NONE;

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

            this.SetTileMaterial();
        }
コード例 #4
0
        public virtual void SetupBlock(BlockInfo.BlockTypes type, int initCounter)
        {
            this._blockType  = type;
            this._blockState = BlockInfo.BlockState.NONE;

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

            this.SetTileMaterial();
        }
コード例 #5
0
        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;
        }
コード例 #6
0
        public virtual void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state)
        {
            this._blockType     = type;
            this._blockState    = state;
            this._previousState = state;

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

            this.SetTileMaterial();
        }
コード例 #7
0
        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();
        }
コード例 #8
0
        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();
        }
コード例 #9
0
ファイル: BlockClass.cs プロジェクト: ChrisJong/Harmony
        public virtual void Init() {
            if(this._blockState == BlockInfo.BlockState.UP) {
                this.transform.position = new Vector3(this.transform.position.x, 1.0f, this.transform.position.z);
                this.isUp = true;
                this._blockState = BlockInfo.BlockState.NONE;
                this._previousState = BlockInfo.BlockState.UP;
                this._firstState = BlockInfo.BlockState.UP;

                this.blockMaterials[0] = this.tileUpMaterial;
            } else {
                this.transform.position = new Vector3(this.transform.position.x, 0.0f, this.transform.position.z);
                this.isUp = false;
                this._blockState = BlockInfo.BlockState.NONE;
                this._previousState = BlockInfo.BlockState.DOWN;
                this._firstState = BlockInfo.BlockState.DOWN;

                this.blockMaterials[0] = this.tileDownMaterial;
            }
        }
コード例 #10
0
        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
        }
コード例 #11
0
        public virtual void Init()
        {
            if (this._blockState == BlockInfo.BlockState.UP)
            {
                this.transform.position = new Vector3(this.transform.position.x, 1.0f, this.transform.position.z);
                this.isUp           = true;
                this._blockState    = BlockInfo.BlockState.NONE;
                this._previousState = BlockInfo.BlockState.UP;
                this._firstState    = BlockInfo.BlockState.UP;

                this.blockMaterials[0] = this.tileUpMaterial;
            }
            else
            {
                this.transform.position = new Vector3(this.transform.position.x, 0.0f, this.transform.position.z);
                this.isUp           = false;
                this._blockState    = BlockInfo.BlockState.NONE;
                this._previousState = BlockInfo.BlockState.DOWN;
                this._firstState    = BlockInfo.BlockState.DOWN;

                this.blockMaterials[0] = this.tileDownMaterial;
            }
        }
コード例 #12
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;
            }
        }
コード例 #13
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();
        }
コード例 #14
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();
        }
コード例 #15
0
        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;
            }
        }
コード例 #16
0
ファイル: WarpBlock.cs プロジェクト: ChrisJong/Harmony
        public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockDirection direction, BlockInfo.BlockState state)
        {
            base.SetupBlock(type, direction, state);

            this.warpDirection = (PlayerInfo.MovementDirection)((int)direction);
#if UNITY_EDITOR
            this.SetMiscMaterial();
#endif
            this.blockMaterials[1]             = this.warpDownMaterial;
            this.blockRenderer.sharedMaterials = this.blockMaterials;
        }
コード例 #17
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();
        }
コード例 #18
0
ファイル: EmptyBlock.cs プロジェクト: ChrisJong/Harmony
 public override void SetupBlock(BlockInfo.BlockTypes type, BlockInfo.BlockState state)
 {
     base.SetupBlock(type, state);
 }
コード例 #19
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();
        }