示例#1
0
        internal void InitializeForType(MegaloScriptModel model, string actionType)
        {
            var proto_action = model.Database.GetAction(actionType);

            ProtoData = proto_action;
            NotifyPropertyChanged(kProtoDataChanged);
            Arguments = new MegaloScriptArguments(model, ProtoData);
        }
示例#2
0
        internal void InitializeForType(MegaloScriptModel model, int actionType)
        {
            Contract.Requires(actionType >= 0 && actionType < model.Database.Actions.Count);

            ProtoData = model.Database.Actions[actionType];
            NotifyPropertyChanged(kProtoDataChanged);
            Arguments = new MegaloScriptArguments(model, ProtoData);
        }
示例#3
0
        void HandleRemoval(MegaloScriptArguments args)
        {
            foreach (var value_id in args)
            {
                var value = Values[value_id];
                if (value.IsGlobal)
                {
                    continue;
                }

                Values[value_id] = null;
            }
        }
示例#4
0
        public bool ValuesEqual(MegaloScriptModel model, MegaloScriptArguments other)
        {
            bool equals = ProtoData.ParameterList.Count == other.ProtoData.ParameterList.Count;

            for (int x = 0; equals && x < mValueIds.Length; x++)
            {
                var value       = Get(model, x);
                var other_value = other.Get(model, x);

                equals &= value.Equals(other_value);
            }

            return(equals);
        }