Keyboard Akses Control Anime




using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class script : MonoBehaviour {
public Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator> ();
}

// Update is called once per frame
void Update () {
if(Input.GetKeyDown("1")){
print("Press 1");
anim.Play("WAIT01",-1,0f);
}
if(Input.GetKeyDown("2")){
print("Press 2");
anim.Play("WAIT02",-1,0f);
}
if(Input.GetKeyDown("3")){
print("Press 3");
anim.Play("WAIT03",-1,0f);
}
if(Input.GetKeyDown("4")){
print("Press 4");
anim.Play("WAIT04",-1,0f);
}


}
}

++++++++++++++++
if(Input.GetMouseButtonDown(0))){

int n=Random.Range(0,2);
if(n==0){anim.Play("DAMAGED00",-1,0f);}
}
else{
anim.Play("DAMAGED01",-1,0f);
}


private float inputH;
private float inputV;

inputH=Input.GetAxis("Horizontal");
inputV=Input.GetAxis("Vertical");

anim.SetFloat("inputH",inputH);
anim.SetFloat("inputV",inputV);

Reff:
https://coderbyte.com/tutorial/create-a-virtual-reality-game-for-google-cardboard


https://github.com/cardbookvr/solarsystem
https://github.com/panzoid/Solar-System
https://github.com/darknessomi/Unity-SolarSystem


Keyboard Akses Control Anime Keyboard Akses Control Anime Reviewed by ADIARRAY on 18.19 Rating: 5

Tidak ada komentar:

Diberdayakan oleh Blogger.