コード例 #1
0
	// Use this for initialization
	void Start ()
	{
		//playerRespawn();
		timerText = GameObject.Find("Timer").GetComponent<Text>();
		arrow1 = GameObject.Find("ArrowUp").GetComponent<RawImage>();
		arrow2 = GameObject.Find("ArrowRight").GetComponent<RawImage>();
		arrow3 = GameObject.Find("ArrowLeft").GetComponent<RawImage>();
		arrow4 = GameObject.Find("ArrowDown").GetComponent<RawImage>();
		player = GameObject.Find("Shaman").GetComponent<ShamanPlayer>();
		needs = GameObject.Find("NeedsPress").GetComponent<RawImage>();
		wrong = GameObject.Find("Wrong").GetComponent<RawImage>();
		pressssssed = GameObject.Find("Pressed").GetComponent<RawImage>();

	}
コード例 #2
0
ファイル: Bullet.cs プロジェクト: JoryFarice/GameJam2016
	// Update is called once per frame
	void Update () {

		shammy = player.GetComponent<ShamanPlayer>();

		timer += Time.deltaTime;

		if(timer >= .75f)
		{
			Debug.Log("f**k me right?");
			shammy.bulletCount--;
			shammy.anim.SetBool("Shooting", false);
			Destroy (gameObject);
		}
	}
コード例 #3
0
ファイル: Bullet.cs プロジェクト: JoryFarice/GameJam2016
	// Use this for initialization
	void Start ()
	{
		player = GameObject.FindGameObjectWithTag("Player");

		shammy = player.GetComponent<ShamanPlayer>();



		if(player.transform.localScale.x < 0 )
		{
			moveSpeed = -moveSpeed;
			//Debug.Log("F**k me Right?");
		}

		GetComponent<Rigidbody2D>().velocity = new Vector2(moveSpeed , 0);
	}
コード例 #4
0
ファイル: Enemy.cs プロジェクト: JoryFarice/GameJam2016
	// Use this for initialization
	void Start ()
	{
		player = GameObject.FindGameObjectWithTag("Player").GetComponent<ShamanPlayer>();
	}