// 각 parent 좌표(x,y,z)에 해당하는 planeBlock들의 접근을 담당 // planeBlock 들의 특수한 아이템(EGG 를 터치했을 때 색상 변화 등)들의 인터렉션을 옵저버할 수 있다. public override void Initialize(int origin, int j, int k) { base.Initialize(origin, j, k); planeBlockGroup = new PlaneBlock[GameDesignManager.blockLevelSize * GameDesignManager.blockLevelSize]; StartCoroutine(RoutineShowUp(transform, SFXSoundType.BlockDrop, landingheight, landingTime)); _isOncleared = false; }
private void SetPlaneBlock() { for (int i = 0; i < axisIndex; i++) //axisIndex: 0 == x, 1 == y, 2 == z { for (int j = 0; j < BlockSize; j++) { for (int k = 0; k < BlockSize; k++) { GameObject block = Instantiate(planeBlock) as GameObject; PlaneBlock planeblock = block.GetComponent <PlaneBlock>(); planeblock.Initialize(i, j, k); blockArray[i, j, k] = planeblock; } } } }
private void SetPlaneBlock(int blockSize) { for (int i = 0; i < _axisIndex; i++) { for (int j = 0; j < blockSize; j++) { for (int k = 0; k < blockSize; k++) { GameObject block = Instantiate(planeBlock) as GameObject; PlaneBlock planeblock = block.GetComponent <PlaneBlock>(); planeblock.Initialize(i, j, k); planeArray[i, j, k] = planeblock; } } } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.layer.Equals(10)) { planeBlock = other.GetComponent <PlaneBlock>(); switch (planeBlock.category) { case PlaneItemType.Direction: // planeSensor 에서 할 일 switch (planeBlock.CurrentItemName) { case PlaneChildItem.Clockwise: ActionByClockWise(); break; case PlaneChildItem.CounterClockwise: ActionByCounterClockWise(); break; case PlaneChildItem.Slash: ActionBySlash(); break; case PlaneChildItem.BackSlash: ActionByBackSlash(); break; default: // PlaneInteractionType.None break; } break; default: // planeBlock 에서 할 일 planeBlock.ActionByMover(); break; } } }