Ejemplo n.º 1
0
 public override void Init()
 {
     obj_HighLightObj.gameObject.SetActive(true);
     obj_HighLightObj.enabled = true;
     obj_HighLightObj.FlashingOn(Color.red, Color.red);
     Invoke("End", 0.1f);
 }
Ejemplo n.º 2
0
        // Use this for initialization
        void OnEnable()
        {
            h = gameObject.GetComponent <Highlighter>();
            if (h == null)
            {
                h = gameObject.AddComponent <Highlighter>();
            }

            //打开闪烁
            h.FlashingOn(new Color32(178, 255, 255, 0), new Color32(178, 255, 255, 255), 0.3f);
            h.seeThrough = false;

            //空调白雾
            whiteSmoke.SetActive(true);
        }
Ejemplo n.º 3
0
    public void InitModel()
    {
        Model m = m_model.GetComponent <Model>();

        m.obj_StopListener = obj_BuildManager.obj_curBuildProcess.gameObject;
        m.obj_RightModel   = obj_BuildManager.GetCurRightModel();
        HighlightingSystem.Highlighter hler = m.obj_RightModel.GetComponent <HighlightingSystem.Highlighter>();
        if (hler)
        {
            hler.FlashingOn(Color.green, Color.green);
        }
        m.Init();
        m_model.transform.parent        = obj_Parent;
        m_model.transform.localPosition = Vector3.zero;
        obj_Player.m_MoveObject         = m_model.transform;
        obj_Player.Init();
    }
Ejemplo n.º 4
0
 public override void Init()
 {
     for (int i = 0; i < obj_HideObj.Length; i++)
     {
         obj_HideObj[i].SetActive(false);
     }
     for (int j = 0; j < obj_ShowObj.Length; ++j)
     {
         obj_ShowObj[j].SetActive(true);
         HighlightingSystem.Highlighter a = obj_ShowObj[j].GetComponent<HighlightingSystem.Highlighter>();
         if (a)
         {
             a.enabled = true;
             a.FlashingOn(Color.yellow, Color.yellow);
         }
     }
     Invoke("End", 1);
 }
Ejemplo n.º 5
0
 public void Highlight(bool on)
 {
     if (on) {
         if (highlighter == null) {
             var color = StakeColors[use];
             var model = part.FindModelTransform("model");
             highlighter = model.gameObject.AddComponent<Highlighter>();
             if (bound) {
                 var color2 = XKCDColors.LightGreyBlue;
                 highlighter.FlashingOn (color, color2, 1.0f);
             } else {
                 highlighter.ConstantOn (color);
             }
             part.SetHighlightColor (color);
             part.SetHighlight (true, false);
         }
     } else {
         if (highlighter != null) {
             part.SetHighlightDefault ();
             DestroyImmediate (highlighter);
             highlighter = null;
         }
     }
 }