private static bool ResolveFireProjectile(FireProjectileAction action, EncounterState state) { var actorPosition = state.GetEntityById(action.ActorId).GetComponent <PositionComponent>().EncounterPosition; Entity projectile = EntityBuilder.CreateProjectileEntity( state.GetEntityById(action.ActorId), action.ProjectileType, action.Power, action.PathFunction(actorPosition), action.Speed, state.CurrentTick ); state.PlaceEntity(projectile, actorPosition, true); return(true); }
private static bool ResolveSpawnEntity(SpawnEntityAction action, EncounterState state) { state.PlaceEntity(action.EntityToSpawn, action.Position, action.IgnoreCollision); return(true); }