Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Intro_Scritping/ChooseYourOwn/Assets/ChooseYourOwn.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
34 lines (25 sloc)
534 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ChooseYourOwn : MonoBehaviour { | |
public GameObject SpawnAtMouseOBJ; | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () | |
{ | |
spawnMegentaCube (); | |
} | |
//if (STUFF HAPPENS) | |
//{ | |
// do STUFF in HERE | |
//} | |
void spawnMegentaCube () | |
{ | |
//single fire event - IS THE KEY DOWN?????? | |
if (Input.GetKeyDown (KeyCode.A)) | |
{ | |
Instantiate (SpawnAtMouseOBJ, new Vector3(0.0f,0.0f,0.0f),Quaternion.identity); | |
} | |
} | |
} |