public override void Init() { Outputs = new LogicOutput[] { new LogicOutput(this, 0, typeof(BooleanValue)) }; Inputs = new LogicInput[] { new LogicInput(this, 0, typeof(BooleanValue)), new LogicInput(this, 1, typeof(BooleanValue)) }; }
public UpdateValueTask(LogicInput to, Value value) { if (to == null) throw new ArgumentNullException("to"); To = to; Value = value; }
void Awake() { input = transform.Find("Input").GetComponent<LogicInput>(); surface = transform.Find("Archway/Surface").GetComponent<PortalDoorSurface>(); lightMaterial = transform.Find("Archway/Light").GetComponent<MeshRenderer>().material; shineMaterial = transform.Find("Archway/Shine").GetComponent<MeshRenderer>().material; lightRenderer = transform.Find("Archway/Light").GetComponent<MeshRenderer>(); lightCollider = transform.Find("Archway/Light").GetComponent<MeshCollider>(); sound = transform.Find("Audio").GetComponents<AudioSource>(); }
internal List <LogicInput> SelectAllLogicInputsByLogicId(string id) { SQLiteConnection conn = ConnectionToDB(); SQLiteDataReader reader = SelectExecuteSQL(string.Format("select {0} from {1} where logicId = '{2}'", LogicInput.Column, LogicInput.TableName, id), conn); List <LogicInput> logicInputs = LogicInput.MakeResultSet(reader); DisconnectionToDB(conn); return(logicInputs); }
public LogicInput(KeyJoySettingPair keyJoy, Func <bool> excluder = null, KeyPressType keyPressType = KeyPressType.Down, float[] keyPara = null, KeyPressType joyPressType = KeyPressType.JoyDown, float[] joyPara = null, LogicInput alternate = null) { _keyPressType = keyPressType; _joyPressType = joyPressType; KeyJoy = keyJoy; Excluder = excluder; Alternate = alternate; }
void Awake() { input = transform.Find("Input").GetComponent<LogicInput>(); spotlight = transform.Find("Pivot1/Pivot2/Spotlight").GetComponent<Light>(); spotlightLens = transform.Find("Pivot1/Pivot2/SpotlightLens").GetComponent<MeshRenderer>(); sound = transform.Find("Sound").GetComponents<AudioSource>(); target1 = transform.Find("Target1"); target2 = transform.Find("Target1/Target2"); pivot1 = transform.Find("Pivot1"); pivot2 = transform.Find("Pivot1/Pivot2"); motor1 = transform.Find("Pivot1").GetComponent<AudioSource>(); motor2 = transform.Find("Pivot1/Pivot2").GetComponent<AudioSource>(); }
private void DoWork() { string slotId = (string)dataGridViewRow.Cells[Main.HEADER_SLOT].Value; List <LogicItem> items = SQL.SelectAllLogicItemsBySlotId(slotId); List <LogicInput> inputs = SQL.SelectAllLogicInputsByLogicId(items[0].logicId); Dictionary <string, string> inputMap = LogicInput.ConvertObjectToMap(inputs); if (items != null) { command = new Command(items, inputMap); command.SetLogManager(logManager); command.doCommand(); command.Finish(); } }
void Awake() { if (affectAll) affected = FindObjectsOfType<VariableGravity>(); game = FindObjectOfType<GameController>(); input = transform.Find("Input").GetComponent<LogicInput>(); particles = transform.Find("Particles").GetComponent<ParticleSystem>(); gBox = transform.Find("GBox").GetComponent<MeshRenderer>(); gBoxGlow = transform.Find("GBox/GBoxGlow").GetComponent<MeshRenderer>(); gBoxLight = transform.Find("GBox/GBoxLight").GetComponent<Light>(); gBoxParticles = transform.Find("GBox/GBoxParticles").GetComponent<ParticleSystem>(); sound = transform.Find("Audio").GetComponents<AudioSource>(); }
/// <summary> /// lz-2016.09.19 通过逻辑功能键获得当前设置的按键 /// </summary> /// <param name="funKey">逻辑功能键</param> /// <returns></returns> public static KeyCode GetKeyCodeByLogicFunKey(LogicFunction funKey) { int index = (int)funKey; if (index < 0 || index >= s_logicInputConf.Count) { return(KeyCode.None); } LogicInput input = s_logicInputConf[index]; if (null == input || null == input.KeyJoy) { return(KeyCode.None); } return(input.KeyJoy._key); }
private void ExecuteSave(string logicId) { // 로직입력값 저장 Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add(LogicInput.CONST_KEYWORD, CommonUtils.MakeDelimeterItem(textBox2.Text, comboBox4.Text)); dictionary.Add(LogicInput.CONST_STAY, CommonUtils.MakeDelimeterItem(textBox3.Text, textBox4.Text)); dictionary.Add(LogicInput.CONST_SCROLL, CommonUtils.MakeDelimeterItem(textBox8.Text, textBox7.Text, textBox10.Text, textBox9.Text, textBox12.Text, textBox11.Text)); dictionary.Add(LogicInput.CONST_POST_VIEW, textBox5.Text); dictionary.Add(LogicInput.CONST_CATEGORY_MOVE, comboBox5.Text); dictionary.Add(LogicInput.CONST_AGNET, comboBox2.Text); dictionary.Add(LogicInput.CONST_BROWSER, comboBox3.Text); dictionary.Add(LogicInput.CONST_DUPLICATE_ADDRESS, textBox1.Text); dictionary.Add(LogicInput.CONST_SLOT_WAIT_TIME, CommonUtils.MakeDelimeterItem(textBox6.Text, textBox13.Text)); List <LogicInput> logicInputs = LogicInput.ConvertMapToObject(dictionary, logicId); sqlite.DeleteLogicInputByLogicId(logicId); sqlite.InsertAllLogicInpts(logicInputs); // 로직 아이템 저장 DataGridViewRowCollection rows = dataGridView1.Rows; List <LogicItem> LogicItems = new List <LogicItem>(); for (int i = 0; i < rows.Count; i++) { DataGridViewRow row = rows[i]; LogicItem item = new LogicItem(); item.logicId = logicId; item.sequence = row.Cells[LogicItem.HEADER_SEQUENCE].Value.ToString(); item.action = (string)row.Cells[LogicItem.HEADER_ACTION].Value; item.value = (string)row.Cells[LogicItem.HEADER_VALUE].Value; LogicItems.Add(item); } sqlite.DeleteLogicItemByLogicId(logicId); sqlite.InsertAllLogicItems(LogicItems); Close(); }
private static bool CheckLogicInput(LogicInput conf) { if (conf.Excluder != null && !conf.Excluder()) { return(false); } s_curLogicInput = conf; bool keyBoardInput = conf.PressTst(); bool joyStickInput = SystemSettingData.Instance.UseController && (null != conf.JoyTst ? conf.JoyTst() : false); if (keyBoardInput) { PeInput.UsingJoyStick = false; } if (joyStickInput) { PeInput.UsingJoyStick = true; } return(keyBoardInput || joyStickInput); }
internal void InsertAllLogicInpts(List <LogicInput> logicInputs) { SQLiteConnection conn = ConnectionToDB(); using (var command = new SQLiteCommand(conn)) { using (var transaction = conn.BeginTransaction()) { // 100,000 inserts for (var i = 0; i < logicInputs.Count; i++) { LogicInput logicInput = logicInputs.ElementAt(i); command.CommandText = string.Format("insert into " + LogicInput.TableName + " (" + LogicInput.Column + ") values (" + LogicInput.Values + ")", CommonUtils.MakeArray(logicInput)); command.ExecuteNonQuery(); } transaction.Commit(); } } DisconnectionToDB(conn); }
void Awake() { input = transform.Find("Input").GetComponent<LogicInput>(); output = transform.Find("Output").GetComponent<LogicOutput>(); }
public override void Init() { Inputs = new LogicInput[] { new LogicInput(this, 0, typeof(Value)) }; }
void Awake() { input = transform.Find("Input").GetComponent<LogicInput>(); sound = transform.Find("Sound").GetComponent<AudioSource>(); }