Esempio n. 1
0
 public VictimAnimation(Victim pVictim) : base(GetAssets.GetRandomVictim(), 4, 1)
 {
     SetOrigin(width / 2, height / 2);
     _victim      = pVictim;
     currentFrame = 0;
     _lastUpdatedAnimationTime = 0;
 }
Esempio n. 2
0
        public ScorePage(double scoreNumber) : base(GetAssets.GetCorrectDeathPage(scoreNumber))
        {
            SetScaleXY(MyGame.OldX() / width, MyGame.OldY() / height);
            TextBox score = new TextBox(game.width, game.height, 0, 0);

            AddChild(score);
            score.SetText("your score: " + scoreNumber, MyGame.OldX() / 2.5f, MyGame.OldY() * 1.7f / 2.5f);
        }
Esempio n. 3
0
    private void CreateRoad(float spawnX = 0.0f, float spawnY = 0.0f, bool DownLeftOrigin = false)
    {
        Road newRoad = new Road(GetAssets.GetRandomRoad(), this);

        _floorLayer.AddChild(newRoad);
        if (DownLeftOrigin)
        {
            //Not used.
            newRoad.SetOrigin(0, newRoad.height);
        }
        newRoad.SetXY(spawnX, spawnY);
        roadList.Add(newRoad);
        _tileCount++;
        _lastUpdatedRoadsTime = Time.time;
    }
Esempio n. 4
0
 public VictimBike(Level pLevel, string pFacing) : base(GetAssets.GetRandomMotorBike(), 2, 1)
 {
     SetOrigin(width / 2, height / 2);
     facing = pFacing;
     if (facing == "up")
     {
         rotation = 180;
     }
     if (facing == "down")
     {
         rotation = 0;
     }
     _startingRotation = rotation;
     _gotCoords        = false;
     poopedOn          = false;
     _sidewalk         = 190;
     _level            = pLevel;
     currentFrame      = 0;
 }
Esempio n. 5
0
 public Victim(Level pLevel, string pFacing) : base(GetAssets.GetRandomVictim(), 5, 1)
 {
     facing = pFacing;
     if (facing == "up")
     {
         rotation = 180;
     }
     if (facing == "down")
     {
         rotation = 0;
     }
     _startingRotation = rotation;
     _gotCoords        = false;
     poopedOn          = false;
     _varSpeed         = Utils.Random(-VARIABLE_SPEED_MODIFIER, VARIABLE_SPEED_MODIFIER);
     _level            = pLevel;
     SetOrigin(width / 2, height / 2);
     //VictimAnimation victimAnimation = new VictimAnimation(this);
     //AddChild(victimAnimation);
 }
Esempio n. 6
0
        public object Get(GetAssets request)
        {
            ApiUser hdUser = request.ApiUser;

            CheckAssets(hdUser);

            var    query  = base.Request.QueryString;
            string search = query["search"];

            if (!string.IsNullOrWhiteSpace(search))
            {
                search = search.Trim();
                if (search == "*")
                {
                    search = "";
                    query  = System.Web.HttpUtility.ParseQueryString(query.ToString());
                    query.Remove("search");
                }
                request.search = search;
            }

            return(GetAssets(request));

            if (string.IsNullOrWhiteSpace(query["search"]))
            {
                return(base.RequestContext.ToOptimizedResultUsingCache(base.Cache, string.Format("urn:{0}:{1}{2}", base.Request.GetBasicAuth(), base.Request.PathInfo.Substring(1), (base.Request.QueryString.Count > 0 ? ":" + base.Request.QueryString.ToString() : "")),
                                                                       new System.TimeSpan(0, 5, 0), () =>
                {
                    return GetAssets(request);
                }));
            }
            else
            {
                return(GetAssets(request));
            }
        }
Esempio n. 7
0
 public object GetAssets(GetAssets request)
 {
     return(request.QueryResult <Asset>(Models.Assets.GetAssets(request.ApiUser, request.search, request.filter, request.user_id, request.owner_id, request.account_id, request.location_id, request.is_active, request.status, request.limit, request.page)));
 }