public AcePlayer(string playerId, string ctrlType, string name, string peerId, PlaneColor team = PlaneColor.kNone, bool isMissing = false) { // ColorNone is "I don't care" PlayerId = playerId; CtrlType = ctrlType; PeerId = peerId; Name = name; Team = team; IsMissing = isMissing; }
private void CreateMaterials(Material function, Material plane) { for (int c = 0; c < LineColor.Count(); c++) { functionMaterials[c] = new Material(function); functionMaterials[c].color = LineColor.Get(c); } for (int c = 0; c < PlaneColor.Count(); c++) { planeMaterials[c] = new Material(plane); planeMaterials[c].color = PlaneColor.Get(c); } }
protected override void AssignDefaultValuesToSceneNode(SceneNode node) { base.AssignDefaultValuesToSceneNode(node); var n = node as AxisPlaneGridNode; n.AutoSpacing = AutoSpacing; n.GridSpacing = (float)GridSpacing; n.GridThickness = (float)GridThickness; n.FadingFactor = (float)FadingFactor; n.PlaneColor = PlaneColor.ToColor4(); n.GridColor = GridColor.ToColor4(); n.RenderShadowMap = RenderShadowMap; n.UpAxis = UpAxis; n.Offset = (float)Offset; n.AutoSpacingRate = (float)AutoSpacingRate; n.GridPattern = GridPattern; }
private void SetInformation() { int length = expressions.Length; for (int i = 0; i < length; i++) { informationRows[i].text = $"Función {i + 1}: {expressions[i]}"; informationRows[i].color = LineColor.Get(i); informationRows[i].gameObject.SetActive(true); } informationRows[length].text = plotter.GetResultMessage(); informationRows[length].color = PlaneColor.Get(0); informationRows[length].gameObject.SetActive(true); for (int i = length + 1; i < informationRows.Length; i++) { informationRows[i].gameObject.SetActive(false); } }
protected FunctionPlotter(GameObject parent, Mesh lineMesh, Material axisMaterial, Material functionMaterial, Material planeMaterial) { this.parent = parent; this.lineMesh = lineMesh; this.axisMaterial = axisMaterial; this.functionPoints = new List <List <Point> >(); this.functionMaterials = new Material[LineColor.Count()]; this.planeMaterials = new Material[PlaneColor.Count()]; this.axisEnabled = new Dictionary <Axis, bool>(); axisEnabled[Axis.x] = axisEnabled[Axis.y] = axisEnabled[Axis.z] = true; minI = new FunctionPoint(); maxI = new FunctionPoint(); minD = new FunctionPoint(); maxD = new FunctionPoint(); minF = new FunctionPoint(); maxF = new FunctionPoint(); CreateMaterials(functionMaterial, planeMaterial); }
private void Awake() { GameObject.FindGameObjectWithTag("Player").GetComponent <SpriteRenderer>().enabled = false; planeColor = (PlaneColor)PlayerPrefs.GetInt("Plane Color", 0); gameState = GameState.Menu; }