Predicates.ROLL C# (CSharp) Метод

ROLL() публичный Метод

public ROLL ( object args ) : void
args object
Результат void
    public void ROLL(object[] args)
    {
        // override physics rigging
        foreach (object arg in args) {
            if (arg is GameObject) {
                (arg as GameObject).GetComponent<Rigging> ().ActivatePhysics(false);
            }
        }

        Vector3 targetPosition;

        Helper.PrintRDFTriples (rdfTriples);

        if (rdfTriples [0].Item2.Contains ("_to_top")) {	// fix for multiple RDF triples
            if (args [0] is GameObject) {
                if (args [1] is Vector3) {
                    GameObject obj = args [0] as GameObject;
                    Renderer[] renderers = obj.GetComponentsInChildren<Renderer> ();
                    Bounds bounds = new Bounds ();

                    foreach (Renderer renderer in renderers) {
                        if (renderer.bounds.min.y - renderer.bounds.center.y < bounds.min.y - bounds.center.y) {
                            bounds = renderer.bounds;
                        }
                    }

                    Debug.Log ("move_to_top: " + (bounds.center.y - bounds.min.y).ToString ());
                    targetPosition = new Vector3 (((Vector3)args [1]).x,
                                                  ((Vector3)args [1]).y + (bounds.center.y - bounds.min.y),
                                                  ((Vector3)args [1]).z);
                    obj.GetComponent<Voxeme> ().targetPosition = targetPosition;
                }
            }
        }
        return;
    }