Beispiel #1
0
        public void Init(GameObject obj)
        {
            this.node = obj;
            this.Hide();
            this.icon  = Utility.GetComponetInChild <Image>(this.node, "Treasure/Icon");
            this.label = Utility.GetComponetInChild <Text>(this.node, "Treasure/Text");
            this.Num   = Utility.FindChildByName(this.node, "TreasureNum");
            Singleton <EventRouter> .get_instance().AddEventHandler(EventID.DropTreasure, new Action(this.onGetTreasure));

            UT.If_Null_Error <GameObject>(this.node);
            UT.If_Null_Error <Image>(this.icon);
            UT.If_Null_Error <Text>(this.label);
            UT.If_Null_Error <GameObject>(this.Num);
        }