コード例 #1
0
        //---------------------------------//
        private void _AddEvent( BlockEventBase.EventType eventType )
        //---------------------------------//
        {
            GameObject go = new GameObject( eventType.ToString() + " Event" );
            go.transform.parent = transform;

            string newComponentName = "BrandXR.BlockEvent" + eventType.ToString();
            Type componentType = ComponentHelper.FindType( newComponentName );
            
            BlockEventHelper helper = new BlockEventHelper( eventType );
            helper.SetBlockEventBase( (BlockEventBase)go.AddComponent( componentType ) );
            helper.GetBlockEventBase()._PrefabManager = _PrefabManager;

            blockEventHelpers.Add( helper );

            if( showDebug )
            {
                Debug.Log( "BlockEvent.cs _AddEvent() Added new Helper(" + helper.GetBlockEventBase().name + ")! blockEventHelpers.Count = " + blockEventHelpers.Count );
            }

        } //END AddEvent
コード例 #2
0
            //-------------------------------------------------------------//
            public BlockEventHelper( BlockEventBase.EventType eventType )
            //-------------------------------------------------------------//
            {
                this.eventType = eventType;

            } //END Constructor