コード例 #1
0
ファイル: Player.cs プロジェクト: JackUnthank/Portfolio
	void Awake()
	{
		coords = new int[2];
		lastCoords = new int[2];
		canSee = new List<Player> ();
		m_AttackAxisInUse = false; 
		tr = transform;
		CombatMode = false; 
		pos = transform.position;
		currentPath = new List<Vector2> ();
		controller = GetComponent<PlayerController>();
		workingAI = new AIBase (this);
		lastInput = Vector3.one;
		playerStats = new PlayerStats (); 
		currentState = CharacterState.Still;
		controller.SetSpeed (playerStats.GetSpeed());
		isStuck = 0;
		canAttack = "Enemy";
		coolDownLimit = playerStats.GetAttackCooldown();
		currentAttackCoolDown = 0; 
		inventory = GetComponent<InventoryBase>();
		weaponController = GetComponentInChildren<WeaponController> ();
		anim = GetComponent<Animator>(); 
		spriteRen = GetComponent<SpriteRenderer> ();
		//seeker = GetComponent<Seeker> (); 

	}