コード例 #1
0
ファイル: PlayerStats.cs プロジェクト: cooperdombeck/Stuff
	// Use this for initialization
	void Start () {

		s_attackMelee = GetComponent<PlayerAttackMelee> ();
		s_attackRanged = GetComponent<PlayerAttackRanged> ();
		s_movement = GetComponent<PlayerMovement> ();

		s_attackMelee.enabled = true;
		s_attackRanged.enabled = false;
		aiu_combatToggle = false;

		health = 100;
	}
コード例 #2
0
ファイル: PlayerMovement.cs プロジェクト: cooperdombeck/Stuff
	// need to get isBlocking from PlayerAttackMelee.cs

	void Awake () {

		//aiu stands for "axis in use"; acts like a toggle
		aiu_crouch = false;
		aiu_jump = false;
		facingRight = true;
		isCrouching = false;
		isPerformingAction = false;
		isGrounded = true;

		rb = GetComponent<Rigidbody2D> ();
		rb.freezeRotation = true;

		s_attackMelee = GetComponent<PlayerAttackMelee> ();
		s_attackRanged = GetComponent<PlayerAttackRanged> ();

		transform.localScale = new Vector3 (DEF_PLAYER_WIDTH, DEF_PLAYER_HEIGHT, 1f);

		moveSpeed = 5f;
		jumpHeight = 1f;
	
	}
コード例 #3
0
	// Use this for initialization
	void Start () {
		s_attackRanged = player.GetComponent<PlayerAttackRanged> ();
	}