Beispiel #1
0
        private bool SetParameterImpl(string name)
        {
            if (storable_ == null || string.IsNullOrEmpty(name))
            {
                return(true);
            }

            var p = storable_.GetParam(name);

            if (p != null)
            {
                SetParameter(p);
                return(true);
            }

            var a = storable_.GetAction(name);

            if (a != null)
            {
                SetParameter(a);
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public override void PostLoad(JSONStorable s)
        {
            if (!string.IsNullOrEmpty(paramName_))
            {
                param_ = s.GetAction(paramName_);

                if (param_ == null)
                {
                    Synergy.LogError(
                        $"PostLoad: action name {paramName_} not in " +
                        $"storable {s.storeId}");
                }

                paramName_ = null;
            }
        }