コード例 #1
0
    private RangeFloat GetBoundsOn(Lane lane)
    {
        Bounds bounds3D = GetWorldspaceBounds();

        Vector3 back  = bounds3D.center + Vector3.back * bounds3D.extents.z;
        Vector3 front = bounds3D.center + Vector3.forward * bounds3D.extents.z;

        float min = lane.GetPositionOnLane(back);
        float max = lane.GetPositionOnLane(front);

        return(new RangeFloat(min, max));
    }
コード例 #2
0
    private void KillEnemyAtJumpDestination(Lane targetLane, Vector3 targetPosition)
    {
        float laneTargetPosition         = targetLane.GetPositionOnLane(targetPosition);
        ObjectRepresentation enemyRecord = LevelState.instance.CheckByKind(ObjectKind.Enemy, targetLane,
                                                                           laneTargetPosition, enemyJumpOnErrorTolerance);

        enemyRecord?.gameObject.GetComponent <Enemy>().JumpedOn();
    }