Ejemplo n.º 1
0
    public void ActiveOnCreature(Creature creature)
    {
        VenomEffect existVenomEffect = creature.GetComponent <VenomEffect>();

        if (existVenomEffect)
        {
            existVenomEffect.ResetDuration();
        }
        else
        {
            GameObject effect = ParticuleManager.Instance.CreateParticle(config.poisonForCreature, creature.transform.position + Vector3.up * 0.3f, Quaternion.identity);

            creature.gameObject.AddComponent <VenomEffect>().SetupForCreature(effect, config.duration, config.damagePerSecondsToCreatures, creature);
        }
    }
Ejemplo n.º 2
0
    public void Die()
         {
        if (PlayerPickAndDrop.IsHandleFood)
        {
            PlayerPickAndDrop.DropOffFood();
        }

                PlayerHealth.enabled  =  false;    
        PlayerController.enabled  =  false;     

        VenomEffect venom = GetComponent <VenomEffect>();

        if (venom)
        {
            Destroy(venom);
        }
        ScreenshotHandler.instance.DeathPlayer();
                IsDie  =  true;

        CameraController.Instance.CanControll = false;
    }
Ejemplo n.º 3
0
    public void ActiveOnPlayer()
    {
        VenomEffect existVenomEffect = Player.Instance.GetComponent <VenomEffect>();

        if (existVenomEffect)
        {
            existVenomEffect.ResetDuration();
        }
        else
        {
            GameObject effect = ParticuleManager.Instance.CreateParticle(config.poisonForPlayer, Vector3.zero, Quaternion.identity);
            effect.transform.parent = CameraController.Instance.transform;
            GameObject effect2 = ParticuleManager.Instance.CreateParticle(config.poisonForPlayer, Vector3.zero, Quaternion.identity);
            effect2.transform.parent = CameraController.Instance.transform;

            effect.transform.localPosition  = new Vector3(-0.6f, -0.41f, 0.36f);
            effect2.transform.localPosition = new Vector3(0.6f, -0.41f, 0.36f);

            Player.Instance.gameObject.AddComponent <VenomEffect>().SetupForPlayer(effect, effect2, config.duration, config.damagesPerSecondsToPlayer);
        }
    }