Пример #1
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)
    {
        currentTime = Time.time;
        player      = GameObject.FindGameObjectWithTag("Player").transform;
        rb          = animator.GetComponent <Rigidbody2D>();
        GameObject Clown = GameObject.Find("Clown");

        script = Clown.GetComponent <clownDamage>();
        if (first == true)
        {
            goPoint  = Time.time + transition;
            goPoint -= Time.time;
        }
        script.targetHealth = 0;
        if (script.damage == true)
        {
            goPoint += currentTime;
        }
        script.damage = false;
    }
Пример #2
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)
    {
        Clown_Move script2 = animator.GetBehaviour <Clown_Move>();

        script2.first = false;
        moveSpots     = GameObject.FindGameObjectWithTag("movespot").transform;
        rb            = animator.GetComponent <Rigidbody2D>();
        GameObject Clown = GameObject.Find("Clown");

        script = Clown.GetComponent <clownDamage>();
        script.targetHealth = script.currentHealth -= 15;
        Clown_Shoot Shoot = animator.GetBehaviour <Clown_Shoot>();

        Shoot.fireRate = 0f;
        Clown_Shoot2 Shoot2 = animator.GetBehaviour <Clown_Shoot2>();

        Shoot2.fireRate = 1f;
        Clown_Shoot3 Shoot3 = animator.GetBehaviour <Clown_Shoot3>();

        Shoot3.fireRate = 2f;
    }
Пример #3
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)
    {
        GameObject Clown = GameObject.Find("Clown");

        script = Clown.GetComponent <clownDamage>();
    }