コード例 #1
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
    public static Vector3Item MakeVector3Item(bool X, bool Y, bool Z)
    {
        Vector3Item v = Vector3Item.None;

        if (X)
        {
            v |= Vector3Item.X;
        }
        if (Y)
        {
            v |= Vector3Item.Y;
        }
        if (Z)
        {
            v |= Vector3Item.Z;
        }
        return(v);
    }
コード例 #2
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
 public static Vector3 ApproachingLimitCap(this Vector3 self, Vector3 other, Vector3 inc, Vector3Item item)
 {
     return(new Vector3(
                item.IsX() ? ApproachingLimitCap(self.x, other.x, inc.x) : self.x,
                item.IsY() ? ApproachingLimitCap(self.y, other.y, inc.y) : self.y,
                item.IsZ() ? ApproachingLimitCap(self.z, other.z, inc.z) : self.z
                ));
 }
コード例 #3
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
 public static Vector3 Merge(this Vector3 self, Vector3 other, Vector3Item item)
 {
     return(new Vector3(item.IsX() ? other.x : self.x, item.IsY() ? other.y : self.y, item.IsZ() ? other.z : self.z));
 }
コード例 #4
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
 public static bool IsZ(this Vector3Item self)
 {
     return((self & Vector3Item.Z) == Vector3Item.Z);
 }
コード例 #5
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
 public static bool IsY(this Vector3Item self)
 {
     return((self & Vector3Item.Y) == Vector3Item.Y);
 }
コード例 #6
0
ファイル: Utils.cs プロジェクト: 2A5F/Unity2DPlatTemplate1
 public static bool IsX(this Vector3Item self)
 {
     return((self & Vector3Item.X) == Vector3Item.X);
 }