コード例 #1
0
        public override CfgEncoder Encode()
        {
            var cody = new CfgEncoder();

            foreach (var lst in sharedV2S)
            {
                cody.Add("u0", lst[0]);
                cody.Add("u1", lst[1]);
            }

            cody.Add_IfNotEmpty("uvs", vertices)

            .Add("pos", localPos)

            .Add_IfTrue("smth", smoothNormal)

            .Add_IfNotZero("shad", shadowBake)



            .Add_IfNotEpsilon("edge", edgeStrength)
            .Add_IfNotEmpty("bs", shapes)
            .Add_IfNotZero("gr", vertexGroup);

            return(cody);
        }
コード例 #2
0
        public override CfgEncoder Encode()
        {
            var cody = new CfgEncoder();

            cody.Add_String("n", name);
            cody.Add_IfNotEmpty("sln", dtaLnks);


            return(cody);
        }
コード例 #3
0
        public override CfgEncoder Encode()
        {
            var cody = new CfgEncoder();

            cody.Add_IfTrue("en", enabled)
            .Add_IfNotZero("t", _targetIndex);

            if (enabled)
            {
                if (sameSizeDataIndex == -1)
                {
                    cody.Add_IfNotEmpty("vals", links);
                }
                else
                {
                    cody.Add_IfNotNegative("sameSize", sameSizeDataIndex);
                }
            }
            return(cody);
        }
コード例 #4
0
ファイル: Node.cs プロジェクト: quizcanners/Node-Notes
        public override CfgEncoder Encode()
        {
            if (_loopLock.Unlocked)
            {
                using (_loopLock.Lock()){
                    var cody = new CfgEncoder() //this.EncodeUnrecognized()
                               .Add_IfNotEmpty("sub", coreNodes)
                               .Add_IfNotEmpty("bg", visualStyleTag)
                               .Add("b", base.Encode);

                    if (gameNodes.Count > 0)
                    {
                        cody.Add_IfNotEmpty("gn", gameNodes, GameNodeBase.all);
                    }

                    return(cody);
                }
            }

            Debug.LogError("Infinite loop detected at {0}. Node is probably became a child of itself. ".F(NameForPEGI));

            return(new CfgEncoder());
        }