12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- var BSvar = 0.5;
- private var Tok = 0.0;
- function Update ()
- {
- if (Input.GetKeyDown (KeyCode.Keypad0) && Time.time > Tok){
- Tok = Time.time + BSvar;
- GetComponent.<Animation>().CrossFade("Santa_backwalk", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad9)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_use", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad1)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_walk", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad2)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_Lsidewalk", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad3)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_Rsidewalk", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad4)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_sneak", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad5)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_run", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad6)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_jump", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad7)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_hoho", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.Keypad8)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_give", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.S)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade ("Santa_standstill", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.I)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade("Santa_idle", BSvar);
- }
- if (Input.GetKeyDown (KeyCode.T)&& Time.time > Tok){
- Tok = Time.time+ BSvar;
- GetComponent.<Animation>().CrossFade("Santa_Tpose", BSvar);
- }
- }
|