Exemplo n.º 1
0
        /// <summary>
        /// Creates a new trail particle
        /// </summary>
        /// <param name="pos">The position in world draw coordinates</param>
        /// <param name="size">The size in pixels</param>
        /// <param name="id"></param>
        public void CreateNewRowOfTrail(Vector2 pos, float size, int id)
        {
            NetworkTrail newTrail = new NetworkTrail(pos, size, indexOnServer, Color.Blue, world, this);

            newTrail.Id            = id;
            newTrail.body.UserData = indexOnServer;
            newTrail.OnDestroy    += DestroyTrail;
            trail.Add(newTrail);

            positionLastAddedTrail = ConvertUnits.ToDisplayUnits(body.Position);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new trail particle
        /// </summary>
        /// <param name="pos">The position in world draw coordinates</param>
        /// <param name="size">The size in pixels</param>
        /// <param name="id"></param>
        public void CreateNewRowOfTrail(Vector2 pos, float size, int id)
        {
            NetworkTrail newTrail = new NetworkTrail(pos, size, indexOnServer, Color.Blue, world, this);
            newTrail.Id = id;
            newTrail.body.UserData = indexOnServer;
            newTrail.OnDestroy += DestroyTrail;
            trail.Add(newTrail);

            positionLastAddedTrail = ConvertUnits.ToDisplayUnits(body.Position);
        }