public static GameObject GenerateNull(GameObject nullPrefabItem, Transform parent, Vector3 location, Material overrideMaterial, Texture2D image, Texture2D clickImage, float delay, Timeline time, int itemNum, bool playSound) { GameObject tmp = Instantiate(nullPrefabItem); tmp.name = "Item" + itemNum.ToString().PadLeft(2, '0'); tmp.layer = 5; tmp.transform.GetChild(0).gameObject.layer = 5; tmp.transform.GetChild(1).gameObject.layer = 5; DisableAllCollidersInObject(tmp); tmp.GetComponentInChildren <BoxCollider>().enabled = true; tmp.GetComponentInChildren <BoxCollider>().isTrigger = true; if (image != null) { tmp.GetComponentInChildren <MeshRenderer>().material.mainTexture = image; flipTexture(tmp); } tmp.transform.parent = parent; tmp.transform.localPosition = location; NullEvent script = tmp.GetComponentInChildren <NullEvent>(); script.transitionDelay = delay; script.transitionDuration = (float)itemFallTime; script.localTime = time; script.time = time; script.mainTexture = image; script.clickTexture = clickImage; script.playSoundEffect = playSound; script.changeTexture = false; tmp.GetComponentInChildren <MeshRenderer>().material = overrideMaterial; return(tmp); }
private void MoveToEndStream(NullEvent obj) { //Fx bug, this is the workaround. See: http://connect.microsoft.com/VisualStudio/feedback/details/324064/wpf-listbox-scrollintoview-last-item-after-itemsource-change ScrollViewer.UpdateLayout(); if (ScrollViewer.ExtentWidth > ScrollViewer.ViewportWidth) ScrollViewer.ScrollToHorizontalOffset(ScrollViewer.ExtentWidth - 1); }
public EventViewModel(bool admin) { arole = true; //************** a true values represents the admin role SearchEntity = new NullEvent(); EventCommand = "List"; Entity = new Event(); if (Settings.Default.initdatabase.Equals("true") && _initialized == false) { // database is initialized Commands.CompositeEventCommands.EventCommand.InitializeEventDbCommand.Execute(null, null); _initialized = true; } }
public EventViewModel() { arole = false; SearchEntity = new NullEvent(); EventCommand = "List"; Entity = new Event(); if (Settings.Default.initdatabase.Equals("true") && _initialized == false) { // database is initialized Commands.CompositeEventCommands.EventCommand.InitializeEventDbCommand.Execute(null, null); _initialized = true; } }
private void TriggerUpdate(NullEvent obj) { ResetUpdates(); }
protected override void ResetSearch() { SearchEntity = new NullEvent(); base.ResetSearch(); }
static NullEvent() { Instance = new NullEvent(); }