Exemple #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);
        }
Exemple #2
0
        public override void PostLoad(JSONStorable s)
        {
            param_ = s.GetParam(paramName_) as T;

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

            paramName_ = null;
        }