private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponentInChildren <TagHarpoon>())
        {
            ScriptDolphinStamina dolphin_stamina = ScriptGlobalVariables.player.GetComponentInChildren <ScriptDolphinStamina>();

            ScriptHarpoonDamage harpoon = other.GetComponentInChildren <ScriptHarpoonDamage>();
            dolphin_stamina.actual_stamina_value -= harpoon.harpoon_damage;
        }
    }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponentInChildren <TagPlastic>())
        {
            ScriptDolphinStamina dolphin_stamina = ScriptGlobalVariables.player.GetComponentInChildren <ScriptDolphinStamina>();

            dolphin_stamina.actual_stamina_value -= other.GetComponentInChildren <ScriptPlasticDamage>().plastic_damage;
            dolphin_stamina.max_stamina_value    -= other.GetComponentInChildren <ScriptPlasticDamage>().plastic_damage;

            Destroy(other.gameObject);
        }
    }
示例#3
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent <TagAir>())
        {
            ScriptDolphinStamina dolphin_stamina = ScriptGlobalVariables.player.GetComponentInChildren <ScriptDolphinStamina>();

            dolphin_stamina.FullStaminaRecover();
        }
        else if (other.GetComponent <TagDirtyAir>())
        {
            ScriptDolphinStamina dolphin_stamina = ScriptGlobalVariables.player.GetComponentInChildren <ScriptDolphinStamina>();

            dolphin_stamina.PartialStaminaRecover();
        }
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        dolphin_stamina = player.GetComponentInChildren <ScriptDolphinStamina>();
    }