コード例 #1
0
ファイル: Orientation.cs プロジェクト: defacto2k15/PolySpear
 private OrientationInnerData(string name, int indexClockwise, MyHexPosition neighboutOffset, float rotationInDegrees)
 {
     _name              = name;
     _indexClockwise    = indexClockwise;
     _neighboutOffset   = neighboutOffset;
     _rotationInDegrees = rotationInDegrees;
 }
コード例 #2
0
        private void Test(MyHexPosition position, Orientation orientation, MyHexPosition testPoint)
        {
            testPoint = testPoint - position;
            position  = new MyHexPosition(0, 0);
            var transformator = new BattlefieldPointOfViewTransformator(position, orientation);

            var local  = transformator.ToLocalPosition(testPoint);
            var global = transformator.ToGlobalPosition(local);

            Debug.Log($"Center {position} orientation {orientation} target {testPoint} || local {local} || global {global}");
        }
コード例 #3
0
 protected bool Equals(MyHexPosition other)
 {
     return(U == other.U && V == other.V);
 }