public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { FillBase result = null; string className = (string)value; switch (className) { case "Solid": result = new SolidFill(); break; case "LinearGradient": result = new LinearGradientFill(); break; case "PathGradient": result = new PathGradientFill(); break; case "Hatch": result = new HatchFill(); break; case "Glass": result = new GlassFill(); break; } return(result); } return(base.ConvertFrom(context, culture, value)); }
public void Clear() { GlassFill glass = FindObjectOfType <GlassFill>(); glass.clearIngredients(); foreach (GameObject t in glass.toppings) { Destroy(t); } glass.toppings.Clear(); if (MonsterSpawner.inTutorial && !clearButtonEnabled) { YarnBarTending.EnableDialogueFunctions(); clearButtonEnabled = true; } }
// Update is called once per frame void Update() { glass = GameObject.FindWithTag("Glass"); if (glass != null) { glassMove = glass.GetComponent <GlassMove>(); glassFill = glass.GetComponent <GlassFill>(); } // check if currently blending if (blending) { blendTimer += Time.deltaTime; if (blendTimer >= maxBlendTime) { StopBlending(); } } }
// Start is called before the first frame update void Start() { equipIngredient = GameObject.FindWithTag("EquipIngredient").GetComponent <EquipIngredient>(); glassFill = gameObject.GetComponent <GlassFill>(); }