Exemplo n.º 1
0
    private void FleetCorrection(List <GameObject> CorrectionFleet, int ClickNum)
    {
        if (CorrectionFleet.Count > 0 && CorrectionFleet[0].GetComponent <Stats>())
        {
            foreach (GameObject obj in CorrectionFleet)
            {
                _GDB.selectList = CorrectionFleet.ToList();
                Stats _st = obj.GetComponent <Stats>();
                _st.Proector.GetComponent <MeshRenderer>().enabled = true;
                _st.BoxSelected = true;
                _st.WasSelect   = true;
                _st.isSelect    = true;

                gameObject.GetComponent <Select>().PlayUnitSound(CorrectionFleet[0], "Select");
            }
        }
        if (Num1.Count > 0 && !CorrectionFleet[0].GetComponent <Stats>())
        {
            _GDB.selectList.Clear();
            if (_GDB.activeObjectInterface != null)
            {
                _GDB.deactivationInterface();
            }
            _GDB.activeObjectInterface = CorrectionFleet[0];
            CorrectionFleet[0].GetComponent <HealthModule>().TeamActivate();
        }
        ClickCount += 1;
        ClickNumber = ClickNum;
    }
 void OnMouseDown()
 {
     _SEL.ClearSelect();
     if (_GDB.activeObjectInterface != null)
     {
         _GDB.deactivationInterface();
     }
     _GDB.activeObjectInterface = gameObject;
     visible = true;
 }
Exemplo n.º 3
0
 void OnMouseDown()
 {
     _SEL.ClearSelect();
     if (_GDB.activeObjectInterface != null)
     {
         _GDB.deactivationInterface();
     }
     _GDB.activeObjectInterface = gameObject;
     visible = true;
     GameObject.FindGameObjectWithTag("MainUI").GetComponent <BackgroudUI>().pictureSelectObject = tex;
 }