Example #1
0
        public void Initialize()
        {
            if (!mGenerator)
            {
                mGenerator = GetComponentInParent <CurvyGenerator>();
            }
            if (!mGenerator)
            {
                Invoke("Delete", 0);
            }
            else
            {
                mInfo = getInfo();
                // Version changed?
                CheckForVersionUpgrade();

                if (string.IsNullOrEmpty(ModuleName))
                {
                    if (string.IsNullOrEmpty(Info.ModuleName))
                    {
                        ModuleName = Generator.getUniqueModuleNameINTERNAL(Info.MenuName.Substring(Info.MenuName.LastIndexOf("/") + 1));
                    }
                    else
                    {
                        ModuleName = Generator.getUniqueModuleNameINTERNAL(Info.ModuleName);
                    }
                }

                loadSlots();
                mInitialized = true;
            }
        }
Example #2
0
        public CGModule CopyTo(CurvyGenerator targetGenerator)
        {
            var newModule = this.DuplicateGameObject <CGModule>(targetGenerator.transform, false);

            newModule.mGenerator = targetGenerator;
            newModule.Initialize();
            newModule.ModuleName = ModuleName;
            newModule.ModuleName = targetGenerator.getUniqueModuleNameINTERNAL(newModule.ModuleName);
            newModule.SetUniqueIdINTERNAL();
            newModule.renameManagedResourcesINTERNAL();
            return(newModule);
        }
Example #3
0
 public void setINTERNAL(CurvyGenerator generator, string moduleName, string slotName)
 {
     m_Module   = generator.GetModule(moduleName);
     m_SlotName = slotName;
     mSlot      = null;
 }
Example #4
0
 public CGDataReference(CurvyGenerator generator, string moduleName, string slotName)
 {
     setINTERNAL(generator, moduleName, slotName);
 }
Example #5
0
 protected virtual void Awake()
 {
     mGenerator = GetComponentInParent <CurvyGenerator>();
 }
Example #6
0
 public CGDataReference(CurvyGenerator generator, string moduleName, string slotName)
 {
     m_Module   = generator.GetModule(moduleName);
     m_SlotName = slotName;
 }