Exemple #1
0
 public override void PreRender()
 {
     lineGO.SetStart(SceneStartF());
     lineGO.SetEnd(SceneEndF());
     lineGO.SetColor(ColorF());
     // line width is set in world units!
     lineGO.SetLineWidth(LineWidth.WorldValuef);
     lineGO.SetLayer(LayerF(), true);
 }
Exemple #2
0
        void Update()
        {
            LineGO.SetName(NameF());
            LineGO.SetColor(ColorF());
            LineGO.SetStart(StartF());
            LineGO.SetEnd(EndF());
            LineGO.SetLineWidth(LineWidthF());

            if (DeleteConditionF() == true || DeleteNextFrame == true)
            {
                LineGO.Destroy();
            }
        }
Exemple #3
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);
            }
        }