Пример #1
0
    public void PowerBoostStart(int _powerBoost, float powerBoostDuration)
    {
        powerBoost        = _powerBoost;
        powerBoostCounter = powerBoostDuration;

        SCR_main main = GameObject.Find("MAIN").GetComponent <SCR_main>();

        if (main.powerBoostEffectObj)
        {
            GameObject powerBoostEffectInst = Instantiate(main.powerBoostEffectObj, transform.position, transform.rotation) as GameObject;

            Transform powerBoostEffectTrans = powerBoostEffectInst.transform;
            powerBoostEffectTrans.parent = transform;

            powerBoostObj = powerBoostEffectInst.GetComponent <SCR_particle>();
        }
    }
Пример #2
0
    public void PowerBoostStart(int _powerBoost,float powerBoostDuration)
    {
        powerBoost=_powerBoost;
        powerBoostCounter=powerBoostDuration;

        SCR_main main = GameObject.Find ("MAIN").GetComponent<SCR_main>();
        if(main.powerBoostEffectObj){
            GameObject powerBoostEffectInst=Instantiate(main.powerBoostEffectObj,transform.position,transform.rotation) as GameObject;

            Transform powerBoostEffectTrans=powerBoostEffectInst.transform;
            powerBoostEffectTrans.parent=transform;

            powerBoostObj=powerBoostEffectInst.GetComponent<SCR_particle>();
        }
    }