76 lines
1.9 KiB
C#
76 lines
1.9 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Flareon_Animations_controller : MonoBehaviour
|
|
{
|
|
private Animator anim;
|
|
private int animInt;
|
|
|
|
public GameObject TargetObj; //íå çàáóäü ïåðåòàùèòü â èíñïåêòîðå ñþäà íóæíûé îáüåêò
|
|
private cum_Flareon_Animations_controller _actionTarget; //çàìåíè SomeMonoBehavior íà íàçâàíèå ñêðèïòà
|
|
|
|
void Start()
|
|
{
|
|
anim = GetComponent<Animator>();
|
|
animInt = 0;
|
|
_actionTarget = TargetObj.GetComponent<cum_Flareon_Animations_controller>();
|
|
}
|
|
//Clopping
|
|
public void onUp_cloping()
|
|
{
|
|
anim.SetBool("cloping", false);
|
|
}
|
|
public void onDown_cloping()
|
|
{
|
|
anim.SetBool("cloping", true);
|
|
}
|
|
//pat
|
|
public void onUp_pat()
|
|
{
|
|
anim.SetBool("pat", false);
|
|
}
|
|
public void onDown_pat()
|
|
{
|
|
anim.SetBool("pat", true);
|
|
}
|
|
//=============================
|
|
//anim1
|
|
public void On_Trener_anim_next()
|
|
{
|
|
if (anim.GetInteger("play_POW_Flareon_On_Trener_Anim")<7) {
|
|
animInt++;
|
|
}
|
|
anim.SetInteger("play_POW_Flareon_On_Trener_Anim", animInt);
|
|
}
|
|
public void On_Trener_anim_back()
|
|
{
|
|
if (anim.GetInteger("play_POW_Flareon_On_Trener_Anim")>0) {
|
|
animInt--;
|
|
}
|
|
anim.SetInteger("play_POW_Flareon_On_Trener_Anim", animInt);
|
|
}
|
|
public void On_Trener_anim_null()
|
|
{
|
|
anim.SetInteger("play_POW_Flareon_On_Trener_Anim", 0);
|
|
animInt = 0;
|
|
}
|
|
public void On_Trener_anim_six()
|
|
{
|
|
animInt = 6;
|
|
}
|
|
//pat
|
|
public void On_Trener_anim_pat()
|
|
{
|
|
anim.SetBool("play_POW_Flareon_On_Trener_pat", true);
|
|
}
|
|
public void On_Trener_anim_pat_off()
|
|
{
|
|
anim.SetBool("play_POW_Flareon_On_Trener_pat", false);
|
|
}
|
|
public void cum_on_0()
|
|
{
|
|
_actionTarget.cum_on();
|
|
}
|
|
}
|