コード例 #1
0
ファイル: Projectile.cs プロジェクト: gislersoft/TalesOfEtrya
    private void Start()
    {
        target      = TFOGPlayerManager.instance.player.transform;
        aradisStats = TFOGPlayerManager.instance.Aradis.GetComponent <AradisStats>();

        direction   = target.position - transform.position;
        direction.z = direction.y = 0f;
        direction   = direction.normalized * movementSpeed;

        particleSystems = GetComponentsInChildren <ParticleSystem>();
        fxManager       = FX_Manager.Instance;

        var playComponents = TFOGPlayerManager.instance.player.GetComponents <PlayParticleSystem>();

        for (int i = 0; i < playComponents.Length; i++)
        {
            if (playComponents[i].particleName == StringsInGame.ImpactParticlesName)
            {
                impactParticles = playComponents[i];
                break;
            }
        }

        if (impactParticles == null)
        {
            impactParticles              = target.gameObject.AddComponent <PlayParticleSystem>();
            impactParticles.particles    = Instantiate(impact, target, false) as ParticleSystem;
            impactParticles.particleName = StringsInGame.ImpactParticlesName;
        }
    }
コード例 #2
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();
            }));
        }
コード例 #3
0
 void OnDestroy()
 {
     if (HasLight)
     {
         FX_Manager.DeallocateFXLight(light);
         light = null;
     }
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     attackHash     = Animator.StringToHash("PlayerAttack");
     attackModeHash = Animator.StringToHash("PlayerAttackCount");
     isAttacking    = false;
     animator.SetBool(attackHash, isAttacking);
     attackCount   = 0;
     canDealDamage = true;
     fxManager     = FX_Manager.Instance;
 }
コード例 #5
0
        void Awake()
        {
            HasLight = FX_Manager.TryAllocateFXLight(out light);

            if (HasLight)
            {
                light.SetColor(Color.white);
                light.SetRange(100);
                light.m_intensity = 0.1f;
                light.m_isOn      = true;
                light.UpdateData();
                light.UpdateTransform();
            }
        }
コード例 #6
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();
            }));
        }
コード例 #7
0
ファイル: FX_Manager.cs プロジェクト: gislersoft/TalesOfEtrya
 private void Awake()
 {
     Instance = this;
 }
コード例 #8
0
 void Start()
 {
     canDealDamage = true;
     isAttacking   = false;
     fxManager     = FX_Manager.Instance;
 }