private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            m_collider.enabled = false;

            player_logic m_playerlogic = other.GetComponent <player_logic>();
            if (m_playerlogic)
            {
                m_playerlogic.m_charactercontroller.enabled = false;

                m_playerlogic.die();
            }
            exposion.Play(true);
            ball.SetActive(false);
            m_rigidbody.velocity = Vector3.zero;
        }
        if (other.gameObject.tag == "Fireball")
        {
            m_collider.enabled = false;
            exposion1.Play(true);
            exposion2.Play(true);
            exposion3.Play(true);
            ball.SetActive(false);
            m_rigidbody.velocity = Vector3.zero;
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     player = GetComponentInParent <player_logic>();
 }
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        player_logic player = animator.GetComponent <player_logic>();

        player.iscastingfirvall(false);
    }
Exemple #4
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        player_logic m_player = animator.GetComponent <player_logic>();

        m_player.ischaractercontroller(false);
    }
Exemple #5
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        player_logic m_playerlogic = animator.GetComponent <player_logic>();

        m_playerlogic.ispowerup(false);
    }