예제 #1
0
        public void Awake(GObject go)
        {
            if (go == null)
            {
                return;
            }

            GObject = go;

            if (string.IsNullOrWhiteSpace(Name))
            {
                Name = Id.ToString();
            }

            self = (GComponent)go;

            self.Add(this);

            var com = go.asCom;

            if (com != null)
            {
                n16            = (GImage)com.GetChildAt(0);
                Tex_Level      = (GTextField)com.GetChildAt(1);
                Tex_PlayerName = (GTextField)com.GetChildAt(2);
                n15            = (GImage)com.GetChildAt(3);
                Bar_HP         = Bar_HP.Create(com.GetChildAt(4));
                HPGapList      = (GList)com.GetChildAt(5);
                Bar_MP         = Bar_MP.Create(com.GetChildAt(6));
            }
        }
예제 #2
0
        public override void Dispose()
        {
            if (IsDisposed)
            {
                return;
            }

            base.Dispose();

            self.Remove();
            self = null;

            n16            = null;
            Tex_Level      = null;
            Tex_PlayerName = null;
            n15            = null;
            Bar_HP         = null;
            HPGapList      = null;
            Bar_MP         = null;
        }