public void Initialize(int _id, string _username, Vector3 _spawnPosition) { id = _id; username = _username; transform.position = SpawnPoints.GetSpawnPoint(teamdex).position; inputs = new bool[9]; LeftClickCooldown = new TimedCallback(EnableLeftMouseClick, 100f, LeftMouseDown); RightClickCooldown = new TimedCallback(EnableRightMouseClick, 100f, RightMouseDown); name = "Player: " + id; SetMass(120); health = maxHealth; score = 0; deaths = 0; baseMu = mu; tag = "Player"; }
private void MouseClick(bool clickState, TimedCallback projectileTimer, ref bool clickExit) { if (!clickExit && !clickState) { projectileTimer.flexbool = true; } if (clickState && !clickExit && projectileTimer.flexbool) { //CreateItem(inputTick); //OLD PROJECTILE clickExit = true; projectileTimer.Start(); } else { projectileTimer.Update(); } }