// Use this for initialization
 void Start()
 {
     if(isPlayer)
     {
         playerAction = gameObject.GetComponent<PlayerCombatActions>();
     }
     else
     {
         enemyAction = gameObject.GetComponent<EnemyCombatActions>();
     }
 }
	void InitialisePartyPanel()
	{
		memberStatus = new PartyMemberStatus[CombatManager.players.Count];
		
		for(int i = 0; i < CombatManager.players.Count; i++)
		{
			Transform panel = Instantiate (partyMemberPanel, partyLayoutPanel.position, partyLayoutPanel.rotation) as Transform;
			panel.SetParent(partyLayoutPanel, true);
			
			memberStatus[i] = panel.gameObject.GetComponent<PartyMemberStatus>();

			//Initialise the UI and player together <3

			CombatManager.playerStats[i].SetPartyUI (memberStatus[i]);

			memberStatus[i].InitialiseStats();

			//The combat screen should appear
			combatScreenFadeIn = true;
		}

		//Find the main Player
		for(int i = 0; i < CombatManager.playerStats.Count; i++)
		{
			if(CombatManager.playerStats[i].isMain == true)
			{
				mainPlayerScript = CombatManager.players[i].GetComponent<PlayerCombatActions>();
				UpdateActionInfo();
				break;
			}
		}

		initialPlayerAP = (float)mainPlayerScript.combatStats.stat.actionPoints / (float)mainPlayerScript.combatStats.stat.actionPointMax;
		UpdateAPBar ();

		//print ("Success");
		//print (CombatManager.playerStats.Count);
	}