Beispiel #1
0
        public void RunGameLoopOnce()
        {
            // Process player actions
            Players.ForEach(player =>
            {
                if (player.IsKilled)
                {
                    if (player.DeathTimer++ < Constants.DeathTimeLimit)
                    {
                        return;
                    }
                    RespawnPlayer(player);
                }

                if (player.ActionType == null)
                {
                    return;
                }
                player.ActionType.Process(player, this);
                player.ActionType = null;
            });

            // Process all Actors
            ActorList.ForEach(actor => actor.Process(this));

            // Move bullets forward by one
            BulletList.ForEach(bullet => bullet.Process(this));

            // Remove dead shots
            List <Bullet> deadBullets = BulletList.Where(x => x.Collided == true).ToList();

            deadBullets.ForEach(x => BulletList.Remove(x));
        }
Beispiel #2
0
        public List <IStoryEntityObject> GetAllEntityList()
        {
            var el = new List <IStoryEntityObject>();

            ActorList.ForEach(v => el.Add(v));
            GroupList.ForEach(v => el.Add(v));
            EventList.ForEach(v => el.Add(v));
            LocationList.ForEach(v => el.Add(v));
            StuffList.ForEach(v => el.Add(v));
            TaskList.ForEach(v => el.Add(v));
            return(el);
        }
Beispiel #3
0
        //List<IRole> _RoleList = new List<IRole>();
        //public List<IRole> RoleList { get { return _RoleList; } }

        public ICopySupportObject Clone()
        {
            var o = new Story()
            {
                Name = Name, Memo = Memo, BeginTime = BeginTime, EndTime = EndTime, Author = Author, StoryVersion = StoryVersion
            };

            //o.CurrentUniverse = CurrentUniverse.Clone() as IUniverse;
            ActorList.ForEach(v => o.ActorList.Add(v.Clone() as IActor));
            StuffList.ForEach(v => o.StuffList.Add(v.Clone() as IStuff));
            ExpressList.ForEach(v => o.ExpressList.Add(v.Clone() as IExpress));
            NoteList.ForEach(v => o.NoteList.Add(v.Clone() as INote));
            EventList.ForEach(v => o.EventList.Add(v.Clone() as IEvent));
            RelationList.ForEach(v => o.RelationList.Add(v.Clone() as IRelation));
            TaskList.ForEach(v => o.TaskList.Add(v.Clone() as ITask));
            GroupList.ForEach(v => o.GroupList.Add(v.Clone() as IGroup));
            StructureDiagramList.ForEach(v => o.StructureDiagramList.Add(v.Clone() as IStructureDiagram));

            return(o);
        }