Example #1
0
 public override void OnReset()
 {
     targetGameObject = null;
     componentName = null;
     propertyName = null;
     propertyValue = null;
 }
Example #2
0
 public override void OnReset()
 {
     targetString = "";
     startIndex = 0;
     length = -1;
     storeResult = "";
 }
Example #3
0
 public override void OnReset()
 {
     targetGameObject = null;
     stateName = "";
     layer = -1;
     normalizedTime = float.NegativeInfinity;
 }
Example #4
0
 public override void OnReset()
 {
     targetGameObject = null;
     componentName = null;
     fieldName = null; 
     fieldValue = null;
 }
Example #5
0
 public override void OnReset()
 {
     targetGameObject = null;
     animationName = "";
     targetWeight = 1;
     fadeLength = 0.3f;
 }
Example #6
0
 public override void OnReset()
 {
     targetString = "";
     oldString = "";
     newString = "";
     storeResult = "";
 }
Example #7
0
 public override void OnReset()
 {
     title    = "";
     message  = "";
     color    = Color.black;
     duration = NoticeDuration.Medium;
     item     = null;
 }
Example #8
0
 public override void OnReset()
 {
     sequence = "";
     speaker  = null;
     listener = null;
     waitForSequenceCompletion = true;
     storeResult = null;
 }
 public override void OnReset()
 {
     title = "";
     message = "";
     color = Color.black;
     duration = NoticeDuration.Medium;
     item = null;
 }
Example #10
0
 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);
 }
Example #11
0
        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);
        }
Example #12
0
 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);
 }
Example #13
0
 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));
            }
        }
Example #17
0
 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;
 }
Example #18
0
 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;
 }
Example #19
0
 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;
 }
Example #20
0
 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;
 }
Example #21
0
 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;
 }
Example #23
0
 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;
 }
Example #24
0
 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;
 }
Example #25
0
 // 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");
 }
Example #26
0
 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.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();
 }
Example #28
0
            static void Postfix(SharedString ___hugAnimName, SharedActor ___actor)
            {
                if (!enabled)
                {
                    return;
                }


                if (___hugAnimName.Value == "Interact_Massage")
                {
                    settings.CurrentSpouse = ___actor.Value.InstanceId;
                }
            }
Example #29
0
        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;
        }
Example #30
0
        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);
        }
Example #31
0
        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);
        }
Example #32
0
        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
                    {
                    }
                }));
            }
Example #34
0
 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);
     }
 }
Example #35
0
        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);
                }
            }
        }
Example #37
0
        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);
            }
        }
Example #38
0
 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);
     }
 }
Example #39
0
        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);
                }
            }
        }
Example #41
0
 public override void OnReset()
 {
     buttonName = "Fire1";
 }
Example #42
0
 public override void OnReset()
 {
     axisName = "";
     multiplier = 1.0f;
     storeResult = 0;
 }
Example #43
0
 public override void OnReset()
 {
     key = "";
     value = 0;
 }
Example #44
0
 public override void OnReset()
 {
     targetGameObject = null;
     transformName = null;
     storeValue = null;
 }
Example #45
0
 public override void OnReset()
 {
     key = "";
     defaultValue = "";
     storeResult = "";
 }
Example #46
0
 public override void OnReset()
 {
     targetGameObject = null;
     tag = "";
     collidedGameObject = null;
 }
Example #47
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     targetGameObject = null;
     eventName = "";
 }
Example #48
0
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue = "";
 }
 public override void OnReset()
 {
     targetGameObject = null;
     paramaterName = "";
     storeValue = 0;
 }
Example #50
0
 public override void OnReset()
 {
     targetGameObject = null;
     layerName = "Default";
 }
Example #51
0
 public override void OnReset()
 {
     buttonName = "Fire1";
     storeResult = false;
 }
Example #52
0
 public override void OnReset()
 {
     targetString = "";
     storeResult = 0;
 }
Example #53
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     eventName = "";
 }
Example #54
0
 public override void OnReset()
 {
     key = "";
 }
Example #55
0
 public override void OnReset()
 {
     tag = "";
     otherGameObject = null;
 }
Example #56
0
File: Log.cs Project: dev-celvin/DK
 public override void OnReset()
 {
     // Reset the properties back to their original values
     text = "";
     logError = false;
 }
Example #57
0
 public override void OnReset()
 {
     variable = "";
     value = "";
 }
Example #58
0
 public override void OnReset()
 {
     source = null;
     storeResult = null;
 }
Example #59
0
 public override void OnReset()
 {
     targetValue = "";
     targetVariable = "";
 }
Example #60
0
 public override void OnReset()
 {
     gameObjectName = null;
     storeValue = null;
 }