private IEnumerable <GlassInfo> GetInformation(KeyValuePair <Type, Configuration.SitecoreClassConfig> cls) { var scProps = cls.Value.Properties.Where(x => x.Attribute is SitecoreInfoAttribute); List <GlassInfo> infos = new List <GlassInfo>(); foreach (var scProp in scProps) { var propAttr = scProp.Attribute as SitecoreInfoAttribute; var info = new GlassInfo(); info.Name = scProp.Property.Name; info.Type = DashboardUtilities.GetTypeName(scProp.Property.PropertyType); info.InfoType = propAttr.Type.ToString(); infos.Add(info); } return(infos); }
void SetupCocktail(Cocktail cocktail_) { Cocktail = cocktail_; SendMessage("GameStart"); Glass.GlassInfo = GlassInfo.GetGlassType(Cocktail.Glass); Glass.Sum = 0.0f; if (GlassLiquid.AllowBeerFestBeers && Cocktail.Name == "Pint of Beer") { String[] tx = GlassLiquid.BeerFestBeers[UnityEngine.Random.Range(0, GlassLiquid.BeerFestBeers.Length)].Split('-'); OrderText.text = "Pint of " + tx[0].Trim(); BreweryText.text = tx[1].Trim(); } else { OrderText.text = Cocktail.Name; BreweryText.text = String.Empty; } SetupMeasures(); Debug.LogFormat("Cocktail Setup: Glass = {0}, Name = {1}, GlassMeasures = {2}", Glass.GlassInfo.type, Cocktail.Name, Glass.GlassInfo.measures); }
void Start() { mr = GetComponent <MeshRenderer>(); mf = GetComponent <MeshFilter>(); tr = GetComponent <Transform>(); if (liquids == null) { liquids = new List <GlassLiquid>(10); } mesh = new Mesh(); mf.sharedMesh = mesh; mesh.MarkDynamic(); vertices = new List <Vector3>(100 * 3); colours = new List <Color>(100 * 3); indexes = new List <int>(100 * 3); updateNeeded = true; liquidsOrderChanged = true; GlassInfo = GlassInfo.kPint; }
/// <summary> /// Create a new embossing stamp /// </summary> /// <param name="startDepth">The depth into the facade to start the emboss. 0 indicate the inside, 1 indicates the outside</param> /// <param name="endDepth">The depth into the facade to end the emboss. 0 indicate the inside, 1 indicates the outside</param> /// <param name="additive">If true, this emboss will add material, if false this emboss will cut material away</param> /// <param name="material">The material of this stamp</param> /// <param name="glassInfo">This stamp will be filled in with glass</param> /// <param name="shape">The shape of this stamp in the plane. 0,0 indicates the center, negative values are to the left and down, positive values are to the right and up</param> public Stamp(float startDepth, float endDepth, bool additive, string material, GlassInfo glassInfo, params Vector2[] shape) { StartDepth = startDepth; EndDepth = endDepth; Additive = additive; Material = material; Shape = shape; GlassFill = glassInfo; }
// GlassLiquid beerHead; // // public GlassLiquid BeerHead // { // get // { // if (beerHead != null && beerHead.type == LiquidType.None) // return null; // // return beerHead; // } // set // { // beerHead = value; // } // } Glass() { GlassInfo = GlassInfo.kNone; }