Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class scriptkubus : MonoBehaviour {
- public bool Cube1,Cube2,Cube3,Cube4;
- public string PilihKubus, PilihTag;
- public GameObject PilihObjek;
- // Use this for initialization
- // void Start () {
- // }
- // Update is called once per frame
- void Update () {
- if(Cube1) transform.Rotate(1,0,0);
- if(Cube2) GameObject.Find(PilihKubus).transform.Rotate(0,1,0);
- if(Cube3) GameObject.FindGameObjectWithTag(PilihTag).transform.Rotate(0,0,1);
- if(Cube4 && PilihObjek != null) PilihObjek.transform.Rotate(1,1,1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement