Exemple #1
0
        private void SetStats(EntityStats stats)
        {
            this.X = stats.X;
            this.Y = stats.Y;

            this.Speed = stats.Speed;

            this.CollisionMask = stats.CollisionMask;
        }
Exemple #2
0
        // ---------------------------------------------------------------------------------------------------------
        #endregion


        public static void Init(ref Canvas canvas, EntityStats playerStats, List <EntityStats> entityStats)
        {
            Canvas = canvas;

            Player = new Entity(playerStats);

            if (entityStats != null)
            {
                foreach (EntityStats stats in entityStats)
                {
                    Entities.Add(new Entity(stats));
                }
            }
        }
Exemple #3
0
        public Entity(EntityStats stats, Canvas canvas)
        {
            SetStats(stats);

            AddToCanvas(canvas);
        }
Exemple #4
0
        // ---------------------------------------------------------------------------------------------------------
        #endregion

        #region Constructors
        // ---------------------------------------------------------------------------------------------------------
        public Entity(EntityStats stats)
        {
            SetStats(stats);
        }