コード例 #1
0
	void Awake () {
		// Setting up references.
		playerControl = GetComponent<playerC>();

		player = GameObject.Find("Player");
		healthBar = GameObject.Find("HP").GetComponent<SpriteRenderer>();
		HpEffect = GameObject.Find("HpEffect").GetComponent<SpriteRenderer>();
		scene = GameObject.FindWithTag ("GameScene");
		hp = MaxHp;
		oldHp = hp;
		anim = GetComponent<Animator>();
		
		// Getting the intial scale of the healthbar (whilst the player has full health).
		healthScale = healthBar.transform.localScale;
		HpEffectScale = HpEffect.transform.localScale;
	}
コード例 #2
0
	//private bool wallJumped;
	
	void Awake(){
		//player = gameObject.GetComponent<playerC>();
		playerSc = player.GetComponent<playerC> ();
		//player = GameObject.Find ("Player").GetComponent<playerC> ();
	}
コード例 #3
0
ファイル: ScoreScript.cs プロジェクト: OsDim/ProjectROC
	void Awake(){

		playerControl = GameObject.FindGameObjectWithTag ("Player").GetComponent<playerC> ();
	}
コード例 #4
0
ファイル: weaponScript.cs プロジェクト: OsDim/ProjectROC
	void Awake()
	{
		faceW = GetComponent<playerC>();
	}