public override void OnReset() { targetGameObject = null; componentName = null; propertyName = null; propertyValue = null; }
public override void OnReset() { targetString = ""; startIndex = 0; length = -1; storeResult = ""; }
public override void OnReset() { targetGameObject = null; stateName = ""; layer = -1; normalizedTime = float.NegativeInfinity; }
public override void OnReset() { targetGameObject = null; componentName = null; fieldName = null; fieldValue = null; }
public override void OnReset() { targetGameObject = null; animationName = ""; targetWeight = 1; fadeLength = 0.3f; }
public override void OnReset() { targetString = ""; oldString = ""; newString = ""; storeResult = ""; }
public override void OnReset() { title = ""; message = ""; color = Color.black; duration = NoticeDuration.Medium; item = null; }
public override void OnReset() { sequence = ""; speaker = null; listener = null; waitForSequenceCompletion = true; storeResult = null; }
public virtual TaskStatus OnUpdate() { for (int index = 0; index < this.source.Length; ++index) { SharedString storeResult = this.storeResult; storeResult.set_Value(storeResult.get_Value() + (object)this.source[index]); } return((TaskStatus)2); }
public override TaskStatus OnUpdate() { if (this._minionConfigLs != null) { List <BaseMonoMonster> allMonsters = Singleton <MonsterManager> .Instance.GetAllMonsters(); for (int i = 0; i < this._minionConfigLs.length; i++) { ConfigGroupAIMinion config = this._minionConfigLs.GetConfig <ConfigGroupAIMinion>(i); if (this._minions.ContainsKey(i)) { if (this._minions[i] != null) { continue; } this._minions.Remove(i); } for (int j = 0; j < allMonsters.Count; j++) { if ((allMonsters[j].MonsterName == config.MonsterName) && (allMonsters[j] != this.monster)) { BehaviorDesigner.Runtime.BehaviorTree component = allMonsters[j].GetComponent <BehaviorDesigner.Runtime.BehaviorTree>(); bool flag = true; SharedBool variable = component.GetVariable("Group_IsMinion") as SharedBool; if (!variable.Value) { flag = false; } SharedEntity entity = component.GetVariable("Group_LeaderEntity") as SharedEntity; if ((entity != null) && (entity.Value != null)) { flag = false; } SharedString str = component.GetVariable("GroupAIGrid") as SharedString; if ((str != null) && !string.IsNullOrEmpty(str.Value)) { flag = false; } if (flag && allMonsters[j].IsAIControllerActive()) { BTreeMonsterAIController activeAIController = (BTreeMonsterAIController)allMonsters[j].GetActiveAIController(); if (activeAIController.IsBehaviorRunning()) { activeAIController.SetActive(false); activeAIController.SetActive(true); component.SetVariableValue("Group_LeaderEntity", this.monster); AIData.SetSharedVariableCompat(component, config.AIParams); this._minions.Add(i, allMonsters[j]); break; } } } } } } return(TaskStatus.Success); }
public override TaskStatus OnUpdate() { for (int i = 0; i < this.source.Length; i++) { SharedString expr_0D = this.storeResult; expr_0D.Value += this.source[i]; } return(TaskStatus.Success); }
public override void OnReset() { m_Tag = null; m_layerMask = -1; m_Hit = null; m_CheckDistance = null; m_enableDebug = false; m_offset = null; }
// Reset the public variables public override void OnReset() { fieldOfViewAngle = 90; viewDistance = 1000; offset = Vector3.zero; targetOffset = Vector3.zero; angleOffset2D = 0; targetTag = ""; }
public MainController() { Formula = "M|W|0:1(3),0|1:1(2),1(3),0"; UiView.DefaultShowTime = 0; UiView.DefaultHideTime = 0; DisplayGrid.Value = _currentGrid; _currentGrid.Resize(25, 25); }
public Vector2 DrawText(UniversalFont font, SharedString text, Point position, TextAlign align, Color color, float spacing, float lineHeight, float scale) { Rectangle target = new Rectangle(position.X, position.Y, 0, 0); lock (text) { return(DrawText(font, text.StringBuilder, target, align, color, spacing, lineHeight, scale, TextRotation.None)); } }
public virtual void OnReset() { this.fieldOfViewAngle = (SharedFloat)90f; this.viewDistance = (SharedFloat)1000f; this.offset = (SharedVector3)Vector3.get_zero(); this.targetOffset = (SharedVector3)Vector3.get_zero(); this.angleOffset2D = (SharedFloat)0.0f; this.targetTag = (SharedString)string.Empty; }
public virtual void OnReset() { this.textFormat = (SharedString)string.Empty; this.logError = (SharedBool)false; this.arg0 = (SharedVariable)null; this.arg1 = (SharedVariable)null; this.arg2 = (SharedVariable)null; this.arg3 = (SharedVariable)null; }
public override void OnReset() { // Reset the properties back to their original values textFormat = string.Empty; logError = false; arg0 = null; arg1 = null; arg2 = null; arg3 = null; }
public override void OnReset() { targetGameObject = null; componentName = null; methodName = null; parameter1 = null; parameter2 = null; parameter3 = null; parameter4 = null; storeResult = null; }
public virtual void OnReset() { this.targetGameObject = (SharedGameObject)null; this.componentName = (SharedString)null; this.methodName = (SharedString)null; this.parameter1 = (SharedVariable)null; this.parameter2 = (SharedVariable)null; this.parameter3 = (SharedVariable)null; this.parameter4 = (SharedVariable)null; this.storeResult = (SharedVariable)null; }
public override void OnReset() { this.targetGameObject = null; this.componentName = null; this.methodName = null; this.parameter1 = null; this.parameter2 = null; this.parameter3 = null; this.parameter4 = null; this.storeResult = null; }
public override void OnReset() { targetObject = null; targetTag = string.Empty; objectLayerMask = 0; magnitude = 5; lineOfSight = true; ignoreLayerMask = 1 << LayerMask.NameToLayer("Ignore Raycast"); offset = Vector3.zero; targetOffset = Vector3.zero; }
// Reset the public variables public override void OnReset() { fieldOfViewAngle = 90; viewDistance = 1000; offset = Vector3.zero; targetOffset = Vector3.zero; angleOffset2D = 0; targetTag = ""; drawDebugRay = false; ignoreLayerMask = 1 << LayerMask.NameToLayer("Ignore Raycast"); }
public virtual void OnReset() { this.usePhysics2D = false; this.targetObject = (SharedGameObject)null; this.targetTag = (SharedString)string.Empty; this.objectLayerMask = LayerMask.op_Implicit(0); this.magnitude = (SharedFloat)5f; this.lineOfSight = (SharedBool)true; this.ignoreLayerMask = LayerMask.op_Implicit(1 << LayerMask.NameToLayer("Ignore Raycast")); this.offset = (SharedVector3)Vector3.get_zero(); this.targetOffset = (SharedVector3)Vector3.get_zero(); }
static void Postfix(SharedString ___hugAnimName, SharedActor ___actor) { if (!enabled) { return; } if (___hugAnimName.Value == "Interact_Massage") { settings.CurrentSpouse = ___actor.Value.InstanceId; } }
public void WriteProperty(Property prop, XmlDocument doc, XmlNode node) { var value = prop.CastValue <SharedString>(); string key = value.Key; if (value.ComputedKey == null) { var newShared = SharedString.FromBuffer(value.SharedValue); key = newShared.ComputedKey; } node.InnerText = key; }
public int GetStringReferenceOf(string value) { var normalizedValue = value ?? string.Empty; if (!map.TryGetValue(normalizedValue ?? string.Empty, out SharedString sharedString)) { sharedString = new SharedString() { Value = normalizedValue, Index = map.Count }; map.Add(normalizedValue, sharedString); } return(sharedString.Index); }
protected override bool Init(object controller, object binding, DefinitionFile definition) { if (!base.Init(controller, binding, definition)) { return(false); } DefinitionFileWithStyle file = new DefinitionFileWithStyle(definition, typeof(UiEditBoxBase)); Hint = DefinitionResolver.GetSharedString(Controller, Binding, file["Hint"]) ?? new SharedString(); _maxLength = DefinitionResolver.Get(Controller, Binding, file["MaxLength"], int.MaxValue); _inputType = DefinitionResolver.Get(Controller, Binding, file["InputType"], TextInputType.NormalText); _lostFocusCancels = DefinitionResolver.Get(Controller, Binding, file["CancelOnLostFocus"], false); _focusedShared = DefinitionResolver.GetShared(Controller, Binding, file["IsFocused"], false); _focusedShared.Value = false; string filter = DefinitionResolver.GetString(Controller, Binding, file["Filter"]); if (!filter.IsNullOrEmpty()) { _filter = new List <char>(filter.ToCharArray()); } _focusedShared.ValueChanged += (bool focused) => { if (focused) { CurrentlyFocused = this; } else if (CurrentlyFocused == this) { CurrentlyFocused = null; } }; if (_inputType == TextInputType.Password) { _password = new SharedString(); } RegisterDelegate("TextApply", file["TextApply"]); RegisterDelegate("TextChanged", file["TextChanged"]); RegisterDelegate("TextCancel", file["TextCancel"]); RegisterDelegate("LostFocus", file["LostFocus"]); RegisterDelegate("Return", file["Return"]); return(true); }
public override void Draw(AdvancedDrawBatch drawBatch, DrawButtonInfo info) { Update(info.EllapsedTime, info.ButtonState); SharedString str = _text != null ? _text : info.Text; float scale = _font.Scale; UniversalFont font = _font.Font; Color color = ColorFromState * info.Opacity * Opacity; Rectangle target = _margin.ComputeRect(info.Target); drawBatch.DrawText(font, str, target, _textAlign, color, _font.Spacing, (float)_lineHeight / 100.0f, scale, _textRotation); }
static void Postfix(ITAnimation __instance, SharedString ___ikName, SharedString ___hugAnimName) { //Dbgl("ikName: " + ___ikName.Value+ " hugAnimName: "+ ___hugAnimName.Value); MessageManager.Instance.Subscribe("InteractAnimEnd", new Action <object[]>(delegate(object[] o) { try { __instance.OnEnd(); } catch { } })); }
private void ReadContents() { foreach (var si in data.Descendants("si")) { var t = si.Element("t"); if (t == null) { throw new ArgumentException("Invalid Shared Strings content"); } var sharedString = new SharedString() { Value = t.Value, Index = map.Count }; map.Add(sharedString.Value, sharedString); } }
void IIndexedElement.GetText(SharedString text, int index) { var child = _children[index]; if (child.Tag != null) { lock (child.Tag) { text.Copy(child.Tag.StringBuilder); } } else { text.Format("{0}", index + 1); } }
/// <summary> /// Called when FlatSharp has finished a serialize operation. This is the signal to flush any strings that the /// string writer is hanging onto. /// </summary> public void FlushWrites <TSpanWriter>(TSpanWriter writer, Span <byte> data, SerializationContext context) where TSpanWriter : ISpanWriter { foreach (var kvp in this.stringOffsetMap) { SharedString str = kvp.Key; List <int> offsets = kvp.Value; // Write the string. int stringOffset = writer.WriteAndProvisionString(data, str, context); // Update all the pointers that need to point to that string. foreach (var offset in offsets) { writer.WriteUOffset(data, offset, stringOffset, context); } } }
public void Save(BinaryRobloxFileWriter writer) { writer.Write(FORMAT); writer.Write(Lookup.Count); foreach (var pair in Lookup) { string key = pair.Key; byte[] hash = Convert.FromBase64String(key); writer.Write(hash); SharedString value = Strings[pair.Value]; byte[] buffer = SharedString.Find(value.Key); writer.Write(buffer.Length); writer.Write(buffer); } }
private void drawSharedVariableInput(SharedVariable sv) { if (sv.type == SharedVariable.SharedType.TRANSFORM) { SharedTransform sv_transform = sv as SharedTransform; sv_transform.value = EditorGUILayout.ObjectField(sv_transform.value, typeof(Transform), false) as Transform; } else if (sv.type == SharedVariable.SharedType.STRING) { SharedString sv_string = sv as SharedString; sv_string.value = GUILayout.TextField(sv_string.value); } else if (sv.type == SharedVariable.SharedType.GAMEOBJECT) { SharedGameObject sv_gameobject = sv as SharedGameObject; sv_gameobject.value = EditorGUILayout.ObjectField(sv_gameobject.value, typeof(GameObject), false) as GameObject; } else if (sv.type == SharedVariable.SharedType.OBJECT) { SharedObject sv_object = sv as SharedObject; sv_object.value = EditorGUILayout.ObjectField(sv_object.value, typeof(UnityEngine.Object), false) as UnityEngine.Object; } else if (sv.type == SharedVariable.SharedType.FLOAT) { SharedFloat sv_float = sv as SharedFloat; sv_float.value = EditorGUILayout.FloatField(sv_float.value); } else if (sv.type == SharedVariable.SharedType.INT) { SharedInt sv_integer = sv as SharedInt; sv_integer.value = EditorGUILayout.IntField(sv_integer.value); } else if (sv.type == SharedVariable.SharedType.BOOL) { SharedBool sv_bool = sv as SharedBool; sv_bool.value = EditorGUILayout.Toggle(sv_bool.value); } else if (sv.type == SharedVariable.SharedType.VECTOR) { SharedVector sv_vec = sv as SharedVector; sv_vec.value = EditorGUILayout.Vector3Field("", sv_vec.value); } }
public static XmlNode WriteSharedStrings(XmlDocument doc, XmlRobloxFile file) { XmlElement sharedStrings = doc.CreateElement("SharedStrings"); var binaryWriter = XmlPropertyTokens.GetHandler <BinaryStringToken>(); var binaryBuffer = new Property("SharedString", PropertyType.String); foreach (string key in file.SharedStrings) { XmlElement sharedString = doc.CreateElement("SharedString"); sharedString.SetAttribute("md5", key); binaryBuffer.RawBuffer = SharedString.Find(key); binaryWriter.WriteProperty(binaryBuffer, doc, sharedString); sharedStrings.AppendChild(sharedString); } return(sharedStrings); }
public static void ReadSharedStrings(XmlNode sharedStrings, XmlRobloxFile file) { var error = CreateErrorHandler(nameof(ReadSharedStrings)); if (sharedStrings.Name != "SharedStrings") { throw error("Provided XmlNode's class must be 'SharedStrings'!"); } foreach (XmlNode sharedString in sharedStrings) { if (sharedString.Name == "SharedString") { XmlNode hashNode = sharedString.Attributes.GetNamedItem("md5"); if (hashNode == null) { throw error("Got a SharedString without an 'md5' attribute!"); } string key = hashNode.InnerText; string value = sharedString.InnerText.Replace("\n", ""); byte[] hash = Convert.FromBase64String(key); var record = SharedString.FromBase64(value); if (hash.Length != 16) { throw error($"SharedString base64 key '{key}' must align to byte[16]!"); } if (key != record.Key) { SharedString.Register(key, record.SharedValue); record.Key = key; } file.SharedStrings.Add(key); } } }
public override void OnReset() { buttonName = "Fire1"; }
public override void OnReset() { axisName = ""; multiplier = 1.0f; storeResult = 0; }
public override void OnReset() { key = ""; value = 0; }
public override void OnReset() { targetGameObject = null; transformName = null; storeValue = null; }
public override void OnReset() { key = ""; defaultValue = ""; storeResult = ""; }
public override void OnReset() { targetGameObject = null; tag = ""; collidedGameObject = null; }
public override void OnReset() { // Reset the properties back to their original values targetGameObject = null; eventName = ""; }
public override void OnReset() { targetGameObject = null; storeValue = ""; }
public override void OnReset() { targetGameObject = null; paramaterName = ""; storeValue = 0; }
public override void OnReset() { targetGameObject = null; layerName = "Default"; }
public override void OnReset() { buttonName = "Fire1"; storeResult = false; }
public override void OnReset() { targetString = ""; storeResult = 0; }
public override void OnReset() { // Reset the properties back to their original values eventName = ""; }
public override void OnReset() { key = ""; }
public override void OnReset() { tag = ""; otherGameObject = null; }
public override void OnReset() { // Reset the properties back to their original values text = ""; logError = false; }
public override void OnReset() { variable = ""; value = ""; }
public override void OnReset() { source = null; storeResult = null; }
public override void OnReset() { targetValue = ""; targetVariable = ""; }
public override void OnReset() { gameObjectName = null; storeValue = null; }