@Override
	public TextureRegion getFrame(float stateTime)
	{
		wait--;
		if (x > 800)
			x-=1;
		if (dying > 0)
		{
			dying--;
			if (dying == 0)
			{
				this.x = 1100;
				this.y = 240;
			}
			return treeDie.getKeyFrames()[dying / 24];
		}

		if (firing > 0 && x<=800)
		{
			rooting = 0;
			firing--;
			if (firing == 10)
				fireAcorn();
			return acornFireAnim.getKeyFrames()[firing / 24];
		}

		if (rooting > 0 && x<=800)
		{
			firing = 0;
			rooting--;
			if (rooting == 10)
				fireRoot();
			return rootFireAnim.getKeyFrames()[rooting / 24];
		}
		return treeAnim.getKeyFrame(stateTime);
	}