// 遭受攻擊動畫 IEnumerator BeAttacked(GameObject other) { float directionX = 0f; float directionZ = 0f; if (mAttackCheckers.ContainsKey(other.tag)) { IDirectionHandler d = mAttackCheckers[other.tag](other); if (d.getDirection() == Direction.RIGHT) { directionX = 1f; } else if (d.getDirection() == Direction.LEFT) { directionX = -1f; } else if (d.getDirection() == Direction.FORWARD) { directionZ = 1f; } else if (d.getDirection() == Direction.BACKWARD) { directionZ = -1f; } } GameObject floorCube; if (mIsRotate) { mIsRotate = false; mRotateDirectionX = 0f; mRotateDirectionZ = 0f; mRotationTime = 0f; floorCube = cubesHandler.getFloorCube(mPlayerFloorCubeIndex); transform.position = floorCube.transform.position + Vector3.up; transform.rotation = floorCube.transform.rotation; } GameObject nextFloorCube = cubesHandler.getFloorCube(mPlayerFloorCubeIndex + (int)directionX + (int)directionZ * 12); if (!mBanCheckers.Contains(nextFloorCube.tag)) { yield return(StartCoroutine(CollideUp(directionX, directionZ))); yield return(StartCoroutine(CollideDown(directionX, directionZ))); mPlayerFloorCubeIndex += (int)directionX + (int)directionZ * 12; } else { yield return(StartCoroutine(CollideUp(0f, 0f))); yield return(StartCoroutine(CollideDown(0f, 0f))); } floorCube = cubesHandler.getFloorCube(mPlayerFloorCubeIndex); transform.position = floorCube.transform.position + Vector3.up; transform.rotation = floorCube.transform.rotation; mIsBeAttacked = false; }
public UserAddressController(IUnitOfWork unit, IDirectionHandler direction) { _unit = unit; _direction = direction; }