Esempio n. 1
0
        public static void GenerateDelegate()
        {
            //Generate Manifest before Generating The Delegate
            ManifestGenerator.GenerateManifest();

            //Find the child classes that inherit from our delegates.
            Type baseDel      = typeof(SkillzDelegateBase),
                 turnBasedDel = typeof(SkillzDelegateTurnBased);

            Type[] baseChildren = GetChildClasses(baseDel),
            turnBasedChildren = GetChildClasses(turnBasedDel);

            //Make sure there is only at most 1 of each delegate type.
            if (baseChildren.Length > 1)
            {
                PrintChildClassesError(baseDel, baseChildren);
                return;
            }
            if (turnBasedChildren.Length > 1)
            {
                PrintChildClassesError(turnBasedDel, turnBasedChildren);
                return;
            }

            //Make sure the developer implemented all necessary delegates.
            bool usesThisSystem = (baseChildren.Length == 1),
                 usesTurnBased  = (turnBasedChildren.Length == 1);

            //Create the object and add scripts to it.
            GameObject     delegateObj    = new GameObject("SkillzDelegate");
            SkillzDelegate skillzDelegate = delegateObj.AddComponent <SkillzDelegate>();
        }
Esempio n. 2
0
        public static void GenerateDelegate()
        {
            //Generate Manifest before Generating The Delegate
            ManifestGenerator.GenerateManifest();

            //Create the object and add scripts to it.
            GameObject     delegateObj    = new GameObject("SkillzDelegate");
            SkillzDelegate skillzDelegate = delegateObj.AddComponent <SkillzDelegate>();
        }
Esempio n. 3
0
        public static void GenerateManifest()
        {
            var androidManifestOutputFile = Path.Combine(Application.dataPath, androidManifestPath);
            var buildGradleOutputFile     = Path.Combine(Application.dataPath, buildGradlePath);

            // Creating directory where the default Build.gradle and the Android Manifest will be copied into
            Directory.CreateDirectory(Path.GetDirectoryName(androidPluginDirectory));

            // If file doesn't exist, create default Android Manifest and Build.gradle
            if (!File.Exists(androidManifestOutputFile) && !File.Exists(buildGradleOutputFile))
            {
                ManifestGenerator.CreateDefaultAndroidManifest();
                ManifestGenerator.CreateDefaultBuildGradle();

                UpdateManifest(androidManifestOutputFile);
            }
            else
            {
                Debug.Log("Delete Android Manifest and Build.Gradle inside Plugins/Android if you want to regenerate these files");
            }
        }
Esempio n. 4
0
 public static void RegenerateAndroidManifest()
 {
     ManifestGenerator.GenerateManifest();
 }