コード例 #1
0
        public void Awake()
        {
            Agent = GetComponent <EnemyAgent>();


            ExploderConfig = ConfigManager.ExploderConfigDictionary[Agent.EnemyDataID];
            GlowColor      = Util.GetUnityColor(ExploderConfig.ColorData);

            Agent.MaterialHandler.m_defaultGlowColor = GlowColor;

            if (staticValuesLoaded == false)
            {
                s_explodeFXPool    = FX_Manager.GetPreloadedEffectPool("FX_InfectionSpit");
                staticValuesLoaded = true;
            }

            Agent.add_OnDeadCallback((Action)(() => {
                if (ExploderConfig.NoExplosionOnDeath)
                {
                    return;
                }
                if (Activated == true)
                {
                    return;
                }
                Trigger();
            }));
        }
コード例 #2
0
        public void Awake()
        {
            enemyAgent     = GetComponent <EnemyAgent>();
            exploderConfig = ConfigManager.ExploderConfigDictionary[enemyAgent.EnemyDataID];

            glowColor = Util.GetUnityColor(exploderConfig.ColorData);

            enemyAgent.MaterialHandler.m_defaultGlowColor = glowColor;
            if (staticValuesLoaded == false)
            {
                s_explodeFXPool    = FX_Manager.GetPreloadedEffectPool("FX_InfectionSpit");
                staticValuesLoaded = true;
            }

            enemyAgent.add_OnDeadCallback((Action)(() => {
                Explode();
            }));
        }