Beispiel #1
0
        override public void AdjustBodyAnchors(MiroV1MainBodyAnchors bodyAnchors)
        {
            float hpf =
                GetHPMaxFloat();
            float d = _BodyAnchorDistOnHPMax.Evaluate(hpf);

            AdjustEachBodyAnchor(bodyAnchors, d);
        }
Beispiel #2
0
        public void CreateENFarmForTwo()
        {
            if (_MiroObjs.Count != 2)
            {
                Debug.Log("Not exactly 2 MiroObjects!");
            }

            GameObject            A    = _MiroObjs [0];
            GameObject            B    = _MiroObjs [1];
            MiroV1MainBodyAnchors akrs =
                A.GetComponent <MiroV1MainBodyAnchors> ();
        }
Beispiel #3
0
 static void AdjustEachBodyAnchor(MiroV1MainBodyAnchors bodyAnchors, float d)
 {
     for (int i = 0; i < 6; i++)
     {
         for (int j = 0; j < 3; j++)
         {
             Transform tf    = bodyAnchors.GetAnchor(i, j);
             float     angle = (float)i * 60.0f;
             float     dist  = d * ((float)j + 1.0f);
             Vector2   lpos  = Vector2.right;
             lpos             = Quaternion.AngleAxis(angle, Vector3.forward) * lpos;
             lpos            *= dist;
             tf.localPosition = lpos;
         }
     }
 }
Beispiel #4
0
 virtual public void AdjustBodyAnchors(
     MiroV1MainBodyAnchors bodyAnchors)
 {
 }
Beispiel #5
0
 public void AdjustBodyAnchors(MiroV1MainBodyAnchors bodyAnchors)
 {
     _mainbody.AdjustBodyAnchors(bodyAnchors);
 }