Ejemplo n.º 1
0
 /// <summary>
 /// 指定したviewport座標がパネル範囲内に含まれる場合、true
 /// </summary>
 /// <param name="viewportPoint">Viewport point.</param>
 public bool Contains(Vector3 viewportPoint)
 {
     if (!RangeUtil.IsBetween(viewportPoint.x, leftX, leftX + width))
     {
         return(false);
     }
     if (!RangeUtil.IsBetween(viewportPoint.y, bottomY, bottomY + height))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 指定した座標が経路途上に含まれるかを返します。
 /// </summary>
 /// <returns><c>true</c>, if path range was withined, <c>false</c> otherwise.</returns>
 /// <param name="position">Position.</param>
 public bool OnPathWay(Vector3 position)
 {
     if (!RangeUtil.IsBetween(position.x, Origin.x, Destination.x))
     {
         return(false);
     }
     if (!RangeUtil.IsBetween(position.y, Origin.y, Destination.y))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 3
0
    /// <summary>
    /// ステージをクリアしたかどうか判定します。
    /// </summary>
    /// <returns><c>true</c> if this instance is stage cleared the specified currentStepIndex; otherwise, <c>false</c>.</returns>
    /// <param name="currentStepIndex">Current step index.</param>
    public bool IsStageCleared(int currentStepIndex)
    {
        StageInfo stage = GetCurrentStage();

        return(!RangeUtil.IsBetween(GetRealStepIndex(stage, currentStepIndex), 0, stage.stepInfos.Count - 1));
    }
Ejemplo n.º 4
0
 /// <summary>
 /// 指定したステップでステージをクリアしたかどうか判定します。
 /// </summary>
 /// <returns><c>true</c> if this instance is stage cleared the specified currentStepIndex; otherwise, <c>false</c>.</returns>
 /// <param name="stage">Stage.</param>
 /// <param name="currentStepIndex">Current step index.</param>
 /// <see cref="StageManager.IsStageCleared"/>
 protected bool IsStageCleared(StageInfo stage, int currentStepIndex)
 {
     return(!RangeUtil.IsBetween(GetRealStepIndex(stage, currentStepIndex), 0, stage.stepInfos.Count - 1));
 }