I tried that and I get error
Assets/Scripts/GameManager.cs(28,55): error CS0246: The type or namespace name `Shoot’ could not be found. Are you missing a using directive or an assembly reference?
here is the game manager script
using UnityEngine;
using System.Collections;
using MadLevelManager;
public class GameManager : MonoBehaviour {
public GUIStyle customGuiStyle; // custome guistyle for text you when or lose
public string MenuLevelName; // Which Menu Level to Load
public int TotalPoints; // Custom var for total points need to beat level
public Texture2D ballThreeToDisplay; // Shows 3 balls when no shots have been made
public Texture2D ballTwoToDisplay; // Shows 2 balls when no shots have been made
public Texture2D ballOneToDisplay; // Shows 2 balls when no shots have been made
public Texture2D StarThreeToDisplay; // Shows 3 stars when points have been earned in 1 shot
public Texture2D StarTwoToDisplay; // Shows 2 stars when points have been earned in 2 shot
public Texture2D StarOneToDisplay; // Shows 1 stars when points have been earned in 3 shot
public Texture MenubtnTexture; // Menu Button
public Texture NextbtnTexture; // Next Level Button
public Texture RetrybtnTexture; // Retry Button
public Texture Firebtn; // Fire Button
private SHOOT shoot;
public MadText text;
public MadSprite star1, star2, star3;
// only called once
void Awake(){
shoot = GameObject.Find("FirePoint").GetComponent<Shoot>();
}
// Use this for initialization
void Start () {
Score.pointScore = 0;
shoot.coconuts = 3;
text.text = MadLevelProfile.recentLevelSelected;
}
// Update is called once per frame
void OnGUI() {
GUI.backgroundColor = new Color(0,0,0,0);
if (GUI.Button( new Rect(Screen.width - 175,Screen.height - 175,150,150), Firebtn)){
if (Score.pointScore < (TotalPoints)){
GameObject go = GameObject.Find("FirePoint");
SHOOT other = (SHOOT) go.GetComponent(typeof(SHOOT));
other.Fire();
}
}
//Display number of balls left to shoot
if (shoot.coconuts == 3){
GUI.Label(new Rect(Screen.width - 430, 10, ballThreeToDisplay.width, ballThreeToDisplay.height), ballThreeToDisplay);
}
if (shoot.coconuts == 2){
GUI.Label(new Rect(Screen.width - 430, 10, ballTwoToDisplay.width, ballTwoToDisplay.height), ballTwoToDisplay);
}
if (shoot.coconuts == 1){
GUI.Label(new Rect(Screen.width - 430, 10, ballOneToDisplay.width, ballOneToDisplay.height), ballOneToDisplay);
}
// Displays You Won
if (Score.pointScore >= (TotalPoints)){
GUI.Label(new Rect(Screen.width/2-350,Screen.height/2 - 280, 100, 20), "YOU WON!!!", customGuiStyle);
if (GUI.Button(new Rect(Screen.width/2-220, Screen.height/2 + 20, 150, 150), MenubtnTexture))
//Application.LoadLevel(Application.loadedLevel + 1);
Application.LoadLevel(MenuLevelName);
if (GUI.Button(new Rect(Screen.width/2-70, Screen.height/2 + 20, 150, 150), RetrybtnTexture))
//Application.LoadLevel(Application.loadedLevel + 1);
Application.LoadLevel (Application.loadedLevel);
if (GUI.Button(new Rect(Screen.width/2+80, Screen.height/2 + 20, 150, 150), NextbtnTexture))
//Application.LoadLevel(Application.loadedLevel + 1);
Application.LoadLevel (Application.loadedLevel + 1);
//Displays number of stars earned
if (shoot.coconuts == 2){
GUI.Label(new Rect(Screen.width/2 - 280, Screen.height/2-120, StarThreeToDisplay.width, StarThreeToDisplay.height), StarThreeToDisplay);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_1", true);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_2", true);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_3", true);
MadLevelProfile.SetCompleted(MadLevelProfile.recentLevelSelected, true);
}
if (shoot.coconuts == 1){
GUI.Label(new Rect(Screen.width/2 - 280, Screen.height/2-120, StarTwoToDisplay.width, StarTwoToDisplay.height), StarTwoToDisplay);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_1", true);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_2", true);
MadLevelProfile.SetCompleted(MadLevelProfile.recentLevelSelected, true);
}
if (shoot.coconuts == 0){
GUI.Label(new Rect(Screen.width/2 - 280, Screen.height/2-120, StarOneToDisplay.width, StarOneToDisplay.height), StarOneToDisplay);
MadLevelProfile.SetPropertyEnabled(MadLevelProfile.recentLevelSelected, "star_1", true);
MadLevelProfile.SetCompleted(MadLevelProfile.recentLevelSelected, true);
}
}
// If you didn't win, display try again and main menu button, retry button
else if (shoot.coconuts == 0){
GUI.Label(new Rect(Screen.width/2-350,Screen.height/2 - 280, 100, 20), "Try Again!!!", customGuiStyle);
if (GUI.Button(new Rect(Screen.width/2-220, Screen.height/2 + 20, 150, 150), MenubtnTexture))
//load Menu Level
Application.LoadLevel(MenuLevelName);
if (GUI.Button(new Rect(Screen.width/2-70, Screen.height/2 + 20, 150, 150), RetrybtnTexture))
//reload level
Application.LoadLevel (Application.loadedLevel);
}
}
}
This is the script that has the button that calls the shoot script
Thanks again