Example #1
0
        public User(string user, int userId, int teamId, int inDisplay) : base()
        {
            delta     = Vector2.Zero;
            username  = user;
            id        = userId;
            display   = inDisplay;
            scale     = 1.0f;
            dampening = 0.8f;
            maxSpeed  = 20f;
            action    = (int)Actions.Idling;

            spriteBatch = ScreenManager.spriteBatch;
            collector   = CollectorManager.CollectorByID(teamId);
            collector.AddUser(this);

            pointsNotification = new Notification(2.5f);
            badgeNotification  = new Notification(3f);
            pointsAbsorbDelay  = new Durationizer(0.5f);

            usernameFont   = ContentManager.Font("user_name");
            userpointsFont = ContentManager.Font("user_points");
            teamRing       = ContentManager.Sprite("user_team");

            SetupOffsets();
            SetupAnimations();

            Audio.Play("user.spawn", display);
        }
Example #2
0
 public Notification(float duration)
 {
     this.duration    = new Durationizer(duration);
     this.opacityStep = 0.08f;
     this.offsetStep  = new Vector2(0.75f, 0);
 }