IEnumerator Sink(EnemyEntityViewStruct entity) { entity.animationComponent.playAnimation = "Dead"; DateTime afterTwoSec = DateTime.UtcNow.AddSeconds(2); while (DateTime.UtcNow < afterTwoSec) { entity.transformComponent.position = entity.positionComponent.position + -UnityEngine.Vector3.up * entity.sinkSpeedComponent.sinkAnimSpeed * _time.deltaTime; yield return(null); } uint index; PlayerTargetType enemyType = entitiesDB.QueryEntitiesAndIndex <EnemyEntityStruct>(entity.ID, out index)[index].enemyType; _entityFunctions.SwapEntityGroup <EnemyEntityDescriptor>(entity.ID, (int)ECSGroups.EnemiesToRecycleGroups + (int)enemyType); _enemyDeadSequencer.Next(this, EnemyDeathCondition.Death, entity.ID); }
public PlayerTargetTypeImplementor(PlayerTargetType targetType) { _targetType = targetType; }