Esempio n. 1
0
File: Bind.cs Progetto: vb0067/LGame
        public int GetHeight()
        {
            switch (type)
            {
            case 0:
                try
                {
                    if (isBindSize)
                    {
                        if (methods != null)
                        {
                            if (methods[10] != null)
                            {
                                Object o = JavaRuntime.Invoke(methods[10], obj);
                                if (o is Single)
                                {
                                    return(System.Convert.ToInt32(((Single)o)));
                                }
                                else if (o is Int32)
                                {
                                    return((Int32)o);
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Log.Exception(ex);
                }
                break;

            case 1:
                if (actorObject != null)
                {
                    return(actorObject.GetHeight());
                }
                break;

            case 2:
                if (shapeObject != null)
                {
                    return((int)shapeObject.GetHeight());
                }
                break;

            case 3:
                if (compObject != null)
                {
                    return(compObject.GetHeight());
                }
                break;

            case 4:
                if (lObject != null)
                {
                    return(lObject.GetHeight());
                }
                break;
            }
            return(0);
        }