コード例 #1
0
        public static fLineGameObject CreateLineGO(string sName, Colorf color, float fLineWidth)
        {
            GameObject go = new GameObject(sName);
            CurveRendererImplementation curveRen = CurveRendererSource.Build();

            curveRen.initialize(go, new Colorf(Colorf.Black, 0.75f));
            fLineGameObject lgo = new fLineGameObject(go, curveRen);

            lgo.SetColor(color);
            lgo.SetLineWidth(fLineWidth);
            return(lgo);
        }
コード例 #2
0
        void InitOnMainThread(fGameObject parentGO)
        {
            LineGO = GameObjectFactory.CreateLineGO(NameF(), ColorF(), LineWidthF(), LineWidthType.World);
            LineGO.SetStart(StartF());
            LineGO.SetEnd(EndF());
            if (parentGO != null)
            {
                parentGO.AddChild(LineGO, false);
            }

            LineGO.GetComponent <PreRenderBehavior>().AddAction(() => { Update(); });

            if (OnCreateF != null)
            {
                OnCreateF(LineGO);
            }
        }
コード例 #3
0
 public override void Setup()
 {
     lineGO = GameObjectFactory.CreateLineGO("dimension_line", ColorF(), LineWidth.WorldValuef, LineWidthType.World);
     lineGO.SetLayer(LayerF());
 }