// Random Number Generator int RandomNumberGenerator() { var currentObject = ObjectLists.GetFromJson("Objects.json").Objects.Count; int rng = Random.Range(0, currentObject); return(rng); }
// Turn on subprocedure: plays the TurnOn Animation, sets the state to on, and enables // the light. private void TurnOn() { audio.Play(); state = LampSwitch.State.on; DragYourLightHere.enabled = true; ObjectLists.AddItem(lSwitch); }
void AllValuesAreOfSameType() { if (!ObjectLists.All(dv => dv.Value.ObjectType == ObjectTypes.ObjectList)) { throw new Exception("some fields are not objectList"); } }
//Turn off subprocedure: plays the TurnOff Animation, sets the state to off, and // disables the light. private void TurnOff() { audio.Play(); state = LampSwitch.State.off; DragYourLightHere.enabled = false; ObjectLists.RemoveItem(lSwitch); }
// Turn on subprocedure: plays the TurnOn Animation, sets the state to on, and enables // the light. private void TurnOn() { audio.Play(); GetComponent <Animation>().Play("TurnOnAnimation"); state = LightSwitch.State.on; DragYourLightHere.enabled = true; ObjectLists.AddItem(lSwitch); }
//Turn off subprocedure: plays the TurnOff Animation, sets the state to off, and // disables the light. private void TurnOff() { audio.Play(); GetComponent <Animation>().Play("TurnOffAnimation"); state = LightSwitch.State.off; DragYourLightHere.enabled = false; ObjectLists.RemoveItem(lSwitch); }
private void loadObjects() { string[] tables = ObjectLists.GetTableList(this.sessionGuid); this.Dispatcher.Invoke(() => { this.lvTables.ItemsSource = tables; }); }
/// <summary> /// Initializes a new instance of the <see cref="StructureObject2D{T}" /> class. /// </summary> /// <param name="app">The application.</param> /// <param name="componentsProperties">The components properties.</param> /// <param name="name">The name.</param> internal StructureObject2D(ApiCSiApplication app, StructureComponentsProperties <T> componentsProperties, string name) : base(app, name) { _points = componentsProperties.Points; _crossSections = componentsProperties.CrossSections; _materials = componentsProperties.Materials; _piers = componentsProperties.Piers; _spandrels = componentsProperties.Spandrels; }
public void Switch() { if (toggle == false) { toggle = true; screen.SetActive(toggle); ObjectLists.AddItem(o); audio.mute = false; } }
// Update is called once per frame void Update() { off = ObjectLists.GetOff(); listSize = off.Count(); if (listSize == 0) { Debug.Log("EMPTY"); } else if (target == null) { target = off[Random.Range(0, listSize)]; currentName = target.name; nav.SetDestination(target.transform.position); } }
public Level() : base() { ObjectLists.Initialize(); GameStats.Initialize(); Overlay overlay; Add(overlay = new Overlay()); Camera camera = new Camera() { overlay = overlay }; Add(camera); ObjectLists.Camera = camera; Add(new PathfindingControl()); Add(new SortingThread()); }
// Start is called before the first frame update void Awake() { // Initialize variables firstClient = true; turn = 0; currentButtons = new int[3]; choices = new int[5]; // Initializes Button Listeners b_FirstButton.onClick.AddListener(OptionOne); b_SecondButton.onClick.AddListener(OptionTwo); b_ThirdButton.onClick.AddListener(OptionThree); b_ConfirmButton.onClick.AddListener(ConfirmButton); b_CancelButton.onClick.AddListener(CancelButton); // Initialize First Buttons NewClients(0); NewClients(1); NewClients(2); // init roundCounter roundCounter.UpdateRound(0); //get all objects EntireObjectList = ObjectLists.GetFromJson("Objects.json").Objects; // assign categories to dict foreach (var item in EntireObjectList) { if (!categoryDict.ContainsKey(item.type)) { categoryDict.Add(item.type, new List <objectDef> { item }); } else { categoryDict[item.type].Add(item); } } Debug.Log(categoryDict); // all traits AllTraits = TraitLists.GetFromJson("Traits.json").Traits; }
public void ClearBlackBoard() { Objects.Clear(); GameObjects.Clear(); Transforms.Clear(); Vectors.Clear(); ScriptableObjects.Clear(); Strings.Clear(); Floats.Clear(); Ints.Clear(); Bools.Clear(); ObjectLists.Clear(); GameObjectLists.Clear(); TransformLists.Clear(); VectorLists.Clear(); ScriptableObjectLists.Clear(); StringLists.Clear(); FloatLists.Clear(); IntLists.Clear(); BoolLists.Clear(); }
private async Task loadDatabasesAsync() { string[] databaseNames = await ObjectLists.GetDatabaseListAsync(this.sessionGuid); this.Dispatcher.Invoke(() => this.lvDatabaseNames.ItemsSource = databaseNames); }