override public void AdjustBodyAnchors(MiroV1MainBodyAnchors bodyAnchors) { float hpf = GetHPMaxFloat(); float d = _BodyAnchorDistOnHPMax.Evaluate(hpf); AdjustEachBodyAnchor(bodyAnchors, d); }
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> (); }
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; } } }
virtual public void AdjustBodyAnchors( MiroV1MainBodyAnchors bodyAnchors) { }
public void AdjustBodyAnchors(MiroV1MainBodyAnchors bodyAnchors) { _mainbody.AdjustBodyAnchors(bodyAnchors); }