Exemple #1
0
        public Unit(UnitConfig config, MobilityData mobility)
        {
            Logger.LogConfig($"Creating unit object for {config.Name}.", LogLevel.DEBUG);
            MobilityData = mobility;
            Name         = config.Name;
            Price        = config.Price;
            Prefab       = Resources.Load <GameObject>(config.PrefabPath);
            ArtPrefab    = Resources.Load <GameObject>(config.ArtPrefabPath);

            LeavesExplodingWreck = config.LeavesExplodingWreck;

            ArmoryImage           = Resources.Load <Sprite>(config.ArmoryImage);
            ArmoryBackgroundImage = Resources.Load <Sprite>(config.ArmoryBackgroundImage);
            Config     = config;
            VoiceLines = new VoiceLines(config.VoiceLineFolders);
        }