void Update() { switch (mState) { case STATE.FIRING: RUN_Firing(); break; case STATE.RELOADING: RUN_Reloading(); break; } cMisc.FUpdateUI(); }
void Update() { if (cMisc.rPC == null) { Debug.Log("No player"); return; } if (Time.time - mGunD.mLastFireTmStmp > mGunD._fireInterval) { Debug.Log("Shoot grenade"); PJ_EN_PGrenade p = Instantiate(PF_Grenade, transform.position, transform.rotation); p.GetComponent <PJ_Base>().FShootAt(cMisc.rPC.transform.position, transform.position, gameObject); p.mGrenD.vDest = cMisc.rPC.transform.position; mGunD.mLastFireTmStmp = Time.time; } cMisc.FUpdateUI(); }
void Update() { if (cMisc.rPC == null) { Debug.Log("Player not here, sniper won't work"); return; } switch (mState) { case STATE.NOT_CHARGING: RUN_NotCharging(); break; case STATE.CHARGING: RUN_Charging(); break; case STATE.COOLDOWN: RUN_Cooldown(); break; case STATE.STUNNED: RUN_Stunned(); break; } cMisc.FUpdateUI(); }