package pylos.view;

import pylos.model.Model;
import pylos.model.Player;

import com.jme3.material.Material;

public class PlayerGraphics {
	public Material ballMaterial;
	Player model;

	public PlayerGraphics(Player model) {
		this.model = model;
	}

	public void create(View view) {
		if (ballMaterial == null) {
			if (model == Model.player1) {
				ballMaterial = new Material(view.getAssetManager(), "Common/MatDefs/Light/Lighting.j3md");
			} else {
				ballMaterial = new Material(view.getAssetManager(), "Common/MatDefs/Light/Lighting.j3md");
				ballMaterial.setFloat("Shininess", 0.5f);
			}
		}
	}
}

@@ -14,16 +14,47 @@
 .view;%0A%0A
+import javax.vecmath.Color3f;%0A%0A
 import p
@@ -133,16 +133,48 @@
 aterial;
+%0Aimport com.jme3.math.ColorRGBA;
 %0A%0Apublic
@@ -342,16 +342,17 @@
 view) %7B%0A
+%0A
 %09%09if (ba
@@ -508,162 +508,669 @@
 %0A%09%09%09
-%7D else %7B%0A%09%09%09%09ballMaterial = new Material(view.getAssetManager(), %22Common/MatDefs/Light/Lighting.j3md%22);%0A%09%09%09%09ballMaterial.setFloat(%22Shininess%22, 0.5f
+%09ballMaterial.setFloat(%22Shininess%22, 15);%0A%09%09%09%09ballMaterial.setBoolean(%22UseMaterialColors%22, true);%0A%09%09%09%09ballMaterial.setColor(%22Ambient%22,  ColorRGBA.Black);%0A%09%09%09%09ballMaterial.setColor(%22Diffuse%22,  ColorRGBA.Gray);%0A%09%09%09%09ballMaterial.setColor(%22Specular%22, new ColorRGBA(0, 0, 0.8f, 1));%0A%09%09%09%7D else %7B%0A%09%09%09%09ballMaterial = new Material(view.getAssetManager(), %22Common/MatDefs/Light/Lighting.j3md%22);%0A%09%09%09%09ballMaterial.setFloat(%22Shininess%22, 15);%0A%09%09%09%09ballMaterial.setBoolean(%22UseMaterialColors%22, true);%0A%09%09%09%09ballMaterial.setColor(%22Ambient%22,  ColorRGBA.Black);%0A%09%09%09%09ballMaterial.setColor(%22Diffuse%22,  ColorRGBA.DarkGray);%0A%09%09%09%09ballMaterial.setColor(%22Specular%22, ColorRGBA.Orange
 );%0A%09%09%09%7D
+%09
 %0A%09%09%7D

Update Ball material