Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Manda : MonoBehaviour
- {
- public KeyCode mandakey;
- public KeyCode smena;
- public GameObject orochimaru1;
- bool orochimaruskin = true;
- bool mandaskin = false;
- bool mandaonline = false;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update ()
- {
- if (Input.GetKeyDown(mandakey))
- if (mandaonline == false)
- {
- Vector3 orochimarupos = orochimaru1.transform.position;
- Instantiate(orochimaru1,transform.position, transform.rotation) as Transform;
- mandaonline = true;
- print("Polychaem koordinati mandaonline");
- }
- else if (mandaonline == true)
- {
- print("Manda uje prizvana");
- }
- if (Input.GetKeyDown(smena))
- if (orochimaruskin == true)
- {
- orochimaruskin = false;
- print("Vi smenili upravlenie na Manda");
- }
- else
- if (orochimaruskin == false)
- {
- orochimaruskin = true;
- print("Vi smenili upravlenie na Orochimaru");
- }
- }
- }
Add Comment
Please, Sign In to add comment