Hi, I'm a python lover, so I'm trying to get started in Boo, but the compiler fails saying among other things that "GetClickedGameObject is not a member of class ClickEnterGUI".
It's also complaining that GUIManager, Fader and OrtographicZoomer are unknown identifyers (they are behaviors defined in C#). Can someone give me a hand with this, please?
class ClickEnterGUI (MonoBehaviour):
public clickLayerMask as LayerMask;
def Start ():
pass
def Update ():
if Input.GetMouseButtonDown(0):
clickedObj = self.GetClickedGameObject()
if clickedObj is not null:
this.enabled = false
gui = GameObject.Find("GUI")
camera = GameObject.Find("MainCamera")
fadeTime = gui.GetComponent(GUIManager).ActiveGUI.fadeTime
camera.GetComponent(Fader).fadeOutIn(fadeTime, {
gn = clickedObj.GetComponent(GUIName);
computerGUI = gn.guiName;
gui.GetComponent(GUIManager).setGUI(computerGUI);
})
camera.GetComponent(OrtographicZoomer).zoom(2)
def GetClickedGameObject():
// Builds a ray from camera point of view to the mouse position
ray = Camera.main.ScreenPointToRay(Input.mousePosition)
hit as RaycastHit
// Casts the ray and get the first game object hit
if (Physics.Raycast(ray, hit, Mathf.Infinity, clickLayerMask)):
return hit.transform.gameObject
else:
return null