Beispiel #1
0
	protected   void  Start () {

		money = 0;
		controller = GetComponent<PlayerController> ();
		gunController = GetComponent<GunController> ();

		moneyText = GameObject.FindGameObjectWithTag ("money");
		mText = moneyText.GetComponent<Text> ();
		viewCamera = Camera.main;
		//swordButton = GameObject.Find ("swordButton");
		startRot = transform.eulerAngles;
		sword = GameObject.FindGameObjectWithTag ("sword");
		bow = GameObject.FindGameObjectWithTag ("bow");

		sword.transform.localEulerAngles = new Vector3(0,90,50);
		sword.transform.position =  GameObject.FindGameObjectWithTag("hold").transform.position;
		sword.transform.SetParent(this.transform);

		playerHealth = 3.0;

		mText.text = "Money: " + money; 
		hltScript = FindObjectOfType (typeof(Health)) as Health;
		hltScript.takeHeart ();

	}