Start() public method

public Start ( ) : void
return void
Exemplo n.º 1
0
    public void Select()
    {
        if (!objscript.building)
        {
            origX = transform.position.x;
            origZ = transform.position.z;
            formscript.LX.Add(origX);
            formscript.LZ.Add(origZ);
        }

        CHselected.Play();

        //LIFE BAR OPTIMIZATIONS BEGIN
        lifebarr.SetActive(true);
        Lbar.Start();
        Lbar.Upd8Life();
        //LIFE BAR OPTIMIZATIONS END

        //INFORM SELECTEDTROOPS SCRIPT BEGIN
        SelectedTroops.TotalNB++;
        if (objscript.tip == "Villager")
        {
            SelectedTroops.ChangelingsNB++;
        }
        if (objscript.tip == "Ponies-At-Arms")
        {
            SelectedTroops.PAANB++;
        }
        //INFORM SELECTEDTROOPS SCRIPT END

        mothership.transform.tag = "troopsel";         //SET SEL TAG
        mothership.transform.SetParent(formationSupplicant.transform.parent);
        selection.gameObject.SetActive(true);
        selected = true;
    }