Beispiel #1
0
        /*
         * User Functions
         */

        void subscribe()
        {
            // The player wants to jump
            ButtonEventManager.onAButtonDown += (eventObject, playerId) => {
                if (playerId == repairGunModule.activePlayerId)
                {
                    shootBehavior.shoot();
                }
            };
        }
Beispiel #2
0
        void Update()
        {
            ITargetable target = targetBehavior.getTarget();

            if (target == null || target.Equals(null))
            {
                return;
            }

            aimBehavior.aimAt(target);
            shootBehavior.shoot();
        }