Inheritance: MonoBehaviour
Example #1
0
 void Start()
 {
     sizeX = Screen.width/12;
     sizeY = Screen.height;
     m = GetComponent<Music>();
     pb = GetComponent<PauseButton>();
     sb = GetComponent<SaveButton>();
     m.sizeX = pb.sizeX = sb.sizeX = sizeX;
     m.sizeY = pb.sizeY = sb.sizeY = sizeY/5;
     m.offsetX = pb.offsetX = sb.offsetX = 10;
     sb.offsetY = 10 + sizeY/5;
     pb.offsetY = 20 + sizeY/5*2;
     m.offsetY = 30 + sizeY/5*3;
 }
    void Awake()
    {
        platformsList = new List<FloatingPlatform>();
        IEnumerable childPlatforms = GetComponentsInChildren<FloatingPlatform>();
        gameManager = GameManagerScript.Instance();

        foreach (FloatingPlatform platform in childPlatforms) {
            platformsList.Add(platform);
            platform.acceleration = acceleration;
        }
        pauseButton = GameObject.FindObjectOfType<PauseButton>();

        Assert.IsTrue(gameManager);
    }
Example #3
0
public void Start()
	{		UnityAudio = UnityAudio.Find();
		StopGame = false;
		RunningTutorial = true;
		PauseMenu = (new Nothing<PauseMenu>());
		PauseButton = new PauseButton();
		Fox = new Animal("Fox","fox_walking",4,"fox_singing",15,new UnityEngine.Vector3(-0.4f,-7.9f,-0.7f),new UnityEngine.Vector3(-0.4f,-7.9f,-0.7f),new UnityEngine.Vector3(-0.4f,-7.9f,-0.7f));
		Foreground = UnityBackground.Find("GroundMid",0f);
		CurrentTrack = (new Nothing<Track.Item>());
		CurrentCheckpoint = (new Nothing<UnityEngine.Transform>());
		Button = new Button();
		Bird = new Animal("Bird","bird_flying",4,"bird_singing",12,new UnityEngine.Vector3(3f,-7.9f,2f),new UnityEngine.Vector3(-3f,-7.9f,2f),new UnityEngine.Vector3(3f,-7.9f,2f));
		Background = UnityBackground.Find("GroundBack",0f);
		AnimationEnd = false;
		
}
Example #4
0
 void Start()
 {
     blinkTime = 0.0f;
     buttonTimer = 20.0f;
     buttonTimerLimit = 20.0f;
     canUsePowerUp = true;
     rCollision = GameObject.FindGameObjectWithTag("Player").GetComponent<RunnerCollision>();
     runner = GameObject.FindGameObjectWithTag("Player").GetComponent<RunnerScript>();
     pause = GameObject.FindGameObjectWithTag("PauseButton").GetComponent<PauseButton>();
     typeIsSet = false;
     onStart = true;
     type = tag;
     collider.enabled = false;
     renderer.enabled = false;
 }
Example #5
0
 void Start()
 {
     pause = GameObject.FindGameObjectWithTag("PauseButton").GetComponent<PauseButton>();
     recognizer = GameObject.FindGameObjectWithTag("Recognizer").GetComponent<TapDetector>();
     pause.renderer.enabled = false;
     menuPointer.renderer.enabled = false;
     //Save previous timeScale
     if(PlayerPrefs.HasKey("timeScale"))
     {
         savedTimeScale = PlayerPrefs.GetFloat("timeScale");
     }
 }
 void Start()
 {
     pause = GameObject.FindGameObjectWithTag("PauseButton").GetComponent<PauseButton>();
 }
Example #7
0
 // Use this for initialization
 void Start()
 {
     pb = GameObject.Find ("PauseButton").GetComponent<PauseButton>();
 }