// Update is called once per frame void Update() { fartTimer.Update(); if (fartTimer.IsReady()) { SpawnFart(); fartTimer.Reset(); } }
// Update is called once per frame void Update() { fartCooldown.timer -= Time.deltaTime * pollutingSpeed; if (fartCooldown.IsReady()) { fartCooldown.Reset(); Fart(); } else { } }
// Update is called once per frame void Update() { attackCooldown.Update(); if (isOwnByLocalPlayer) { var leftClick = Input.GetMouseButtonDown(0); if (leftClick && attackCooldown.IsReady()) { CmdAttack(Util.MousePositionInWorld); } } if (isServer) { numOfFartAte -= Time.deltaTime; if (numOfFartAte < 0) { numOfFartAte = 0; } } }