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); }
public bool ShouldRecord(EntityShot entity) => entity.IsUpdatedLocalMat;
public Quaternion GetRecordedRot(EntityShot entity) => entity.Rot;
public Vector3 GetRecordedPos(EntityShot entity) => entity.Pos;
public bool ShouldRecord(EntityShot entity) => entity.IsUpdatedVelocity;
public Quaternion GetRecordedRot(EntityShot entity) => Matrix3.LookAt(+entity.LookAtVec, entity.Upward);
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)); }