public ShotGroup(EntityShot entity, World world)
        {
            ParentEntity = entity.ParentEntity;
            Property     = entity.Property;
            World        = world;

            Data = new ShotModelData(World, Property);
        }
        public ShotModelData CreateGroup(EntityShot entity)
        {
            ShotGroup group = new ShotGroup(entity, World);

            group.AddEntity(entity);
            GroupList.Add(group);

            return(group.Data);
        }
 public ShotModelData AddEntityToGroup(EntityShot entity)
 {
     foreach (ShotGroup group in GroupList)
     {
         if (group.IsAddable(entity))
         {
             group.AddEntity(entity);
             return(group.Data);
         }
     }
     return(null);
 }
        public ShotModelData AddEntity(EntityShot entity)
        {
            if (!TypeGroupDict.ContainsKey(entity.Property.Type))
            {
                TypeGroupDict[entity.Property.Type] = new ShotTypeGroup(entity.Property.Type, World);
            }

            ShotTypeGroup typeGroup = TypeGroupDict[entity.Property.Type];

            ShotModelData data = typeGroup.AddEntityToGroup(entity);

            if (data == null)
            {
                data = typeGroup.CreateGroup(entity);
                World.PmxModel.InitShotModelData(data);
            }

            return(data);
        }
Пример #5
0
 public bool ShouldRecord(EntityShot entity) => entity.IsUpdatedLocalMat;
Пример #6
0
 public Quaternion GetRecordedRot(EntityShot entity) => entity.Rot;
Пример #7
0
 public Vector3 GetRecordedPos(EntityShot entity) => entity.Pos;
Пример #8
0
 public bool ShouldRecord(EntityShot entity) => entity.IsUpdatedVelocity;
Пример #9
0
 public Quaternion GetRecordedRot(EntityShot entity) => Matrix3.LookAt(+entity.LookAtVec, entity.Upward);
Пример #10
0
 public bool ShouldRecord(EntityShot entity) => false;
 public void AddEntity(EntityShot entity)
 {
     ShotList.Add(entity);
 }
 public bool IsAddable(EntityShot entity)
 {
     return(entity.ParentEntity == ParentEntity && Property.GroupEquals(entity.Property) &&
            !ShotList.Exists(e => !e.IsDeath || World.FrameCount == e.DeathFrameNo));
 }