/* * User Functions */ void subscribe() { // The player wants to jump ButtonEventManager.onAButtonDown += (eventObject, playerId) => { if (playerId == repairGunModule.activePlayerId) { shootBehavior.shoot(); } }; }
void Update() { ITargetable target = targetBehavior.getTarget(); if (target == null || target.Equals(null)) { return; } aimBehavior.aimAt(target); shootBehavior.shoot(); }